Search in sources :

Example 1 with FilterContext

use of org.apache.pinot.common.request.context.FilterContext in project trino by trinodb.

the class PinotSqlFormatter method formatFilter.

public static String formatFilter(SchemaTableName schemaTableName, FilterContext filterContext, Map<String, ColumnHandle> columnHandles) {
    requireNonNull(filterContext, "filterContext is null");
    Context context = new Context() {

        @Override
        public SchemaTableName getSchemaTableName() {
            return schemaTableName;
        }

        @Override
        public Optional<Map<String, ColumnHandle>> getColumnHandles() {
            return Optional.of(columnHandles);
        }
    };
    return formatFilter(filterContext, context);
}
Also used : FunctionContext(org.apache.pinot.common.request.context.FunctionContext) ExpressionContext(org.apache.pinot.common.request.context.ExpressionContext) FilterContext(org.apache.pinot.common.request.context.FilterContext) PinotPatterns.functionContext(io.trino.plugin.pinot.query.PinotPatterns.functionContext) Map(java.util.Map) Maps.immutableEnumMap(com.google.common.collect.Maps.immutableEnumMap) HashMap(java.util.HashMap)

Aggregations

Maps.immutableEnumMap (com.google.common.collect.Maps.immutableEnumMap)1 PinotPatterns.functionContext (io.trino.plugin.pinot.query.PinotPatterns.functionContext)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ExpressionContext (org.apache.pinot.common.request.context.ExpressionContext)1 FilterContext (org.apache.pinot.common.request.context.FilterContext)1 FunctionContext (org.apache.pinot.common.request.context.FunctionContext)1