Package org.apache.druid.sql.calcite.expression
package org.apache.druid.sql.calcite.expression
-
ClassDescriptionInterface for
SqlOperatorthat need authorization in order to execute.Operand type checker that is used in 'simple' situations: there are a particular number of operands, with particular types, some of which may be optional or nullable, and some of which may be required to be literals.Conversion for SQL operators that map 1-1 onto native functions.Represents two kinds of expression-like concepts that native Druid queries support: (1) SimpleExtractions, which are direct column access, possibly with an extractionFn (2) native Druid expressions and virtual columns When added toVirtualColumnRegistrywhenever used by projections, filters, aggregators, or other query components, these will be converted into native virtual columns usingDruidExpression.toVirtualColumn(String, ColumnType, ExpressionParser)Approximate expression structure is retained in theDruidExpression.arguments, which when fed into theDruidExpression.ExpressionGeneratorthat allDruidExpressionmust be created with will produce the final String expression (which will be later parsed intoExprduring native processing).Create aDruidExpressiongiven some set of input argument sub-expressionsUsed byDruidExpressionto compile a string which can be parsed into anExprfrom given the sub-expression argumentsDirect reference to a physical or virtual columnBuilds expressions for a static constant valueUsed by aDruidExpressionto translate itself into aVirtualColumnto add to a native query when referenced by a projection, filter, aggregator, etc.Literal value, plus aExpressionTypethat represents how to interpret the literal value.A collection of functions for translating from Calcite expressions into Druid objects.Utilities for assisting in writingSqlOperatorConversionimplementations.OperatorConversions.OperatorBuilder<T extends org.apache.calcite.sql.SqlFunction>Helps in creating the operator builder along with validations and type inference for simple operator conversions.This class serves as a tracking structure for managing post aggregator column names and any post aggs that are created as part of translation of a CalciteRexNodeinto native Druid structures.Represents a "simple" extraction of a value from a Druid row, which is defined as a column plus an optional extractionFn.Conversion for SQL operators that map 1-1 onto native functions.