Package org.apache.calcite.sql2rel
Translates a SQL parse tree to relational expression.
-
Interface Summary Interface Description AuxiliaryConverter Converts an expression for a group window function (e.g.InitializerContext Provides context forInitializerExpressionFactory
methods.InitializerExpressionFactory InitializerExpressionFactory supplies default values for INSERT, UPDATE, and NEW.RelStructuredTypeFlattener.SelfFlatteningRel Mix-in interface for relational expressions that know how to flatten themselves.SqlNodeToRexConverter SqlRexContext Contains the context necessary for aSqlRexConvertlet
to convert aSqlNode
expression into aRexNode
.SqlRexConvertlet SqlRexConvertletTable Collection ofSqlRexConvertlet
s.SqlToRelConverter.Config Interface to define the configuration for a SqlToRelConverter.SubQueryConverter SubQueryConverter provides the interface for classes that convert sub-queries into equivalent expressions. -
Class Summary Class Description AuxiliaryConverter.Impl Simple implementation ofAuxiliaryConverter
.CorrelationReferenceFinder Shuttle that finds references to a givenCorrelationId
within a tree ofRelNode
s.CorrelationReferenceFinder.MyRexVisitor Replaces alternative names of correlation variable to its canonical name.DeduplicateCorrelateVariables Rewrites relations to ensure the same correlation is referenced by the same correlation variable.DeduplicateCorrelateVariables.DeduplicateCorrelateVariablesShuttle Replaces alternative names of correlation variable to its canonical name.NullInitializerExpressionFactory An implementation ofInitializerExpressionFactory
that always supplies NULL.ReflectiveConvertletTable Implementation ofSqlRexConvertletTable
which uses reflection to call any method of the formpublic RexNode convertXxx(ConvertletContext, SqlNode)
orpublic RexNode convertXxx(ConvertletContext, SqlOperator, SqlCall)
.RelDecorrelator RelDecorrelator replaces all correlated expressions (corExp) in a relational expression (RelNode) tree with non-correlated expressions that are produced from joining the RelNode that produces the corExp with the RelNode that references it.RelDecorrelator.CorDef A correlation and a field.RelDecorrelator.CorelMap A map of the locations ofLogicalCorrelate
in a tree ofRelNode
s.RelDecorrelator.CorelMapBuilder Builds aRelDecorrelator.CorelMap
.RelDecorrelator.CorRef A unique reference to a correlation field.RelDecorrelator.DecorrelateRexShuttle Shuttle that decorrelates.RelDecorrelator.Frame Frame describing the relational expression after decorrelation and where to find the output fields and correlation variables among its output fields.RelFieldTrimmer Transformer that walks over a tree of relational expressions, replacing eachRelNode
with a 'slimmed down' relational expression that projects only the columns required by its consumer.RelFieldTrimmer.TrimResult Result of an attempt to trim columns from a relational expression.RelStructuredTypeFlattener RelStructuredTypeFlattener removes all structured types from a tree of relational expressions.SqlNodeToRexConverterImpl Standard implementation ofSqlNodeToRexConverter
.SqlToRelConverter SqlToRelConverter.AggregateFinder Visitor that collects all aggregate functions in aSqlNode
tree.SqlToRelConverter.ConfigBuilder Builder for aSqlToRelConverter.Config
.SqlToRelConverter.ConfigImpl Implementation ofSqlToRelConverter.Config
.SqlToRelConverter.CorrelationUse Use of a row as a correlating variable by a given relational expression.SqlToRelConverter.DeferredLookup Deferred lookup.SqlToRelConverter.LookupContext Context to find a relational expression to a field offset.SqlToRelConverter.SubQuery A sub-query, whether it needs to be translated using 2- or 3-valued logic.StandardConvertletTable Standard implementation ofSqlRexConvertletTable
.StandardConvertletTable.AvgVarianceConvertlet Convertlet that handlesAVG
andVARIANCE
windowed aggregate functions.StandardConvertletTable.GreatestConvertlet Convertlet that convertsGREATEST
andLEAST
.StandardConvertletTable.RegrCovarianceConvertlet Convertlet that handlesCOVAR_POP
,COVAR_SAMP
,REGR_SXX
,REGR_SYY
windowed aggregate functions.StandardConvertletTable.TimestampAddConvertlet Convertlet that handles theTIMESTAMPADD
function.StandardConvertletTable.TimestampDiffConvertlet Convertlet that handles theTIMESTAMPDIFF
function.StandardConvertletTable.TrimConvertlet Convertlet that convertsLTRIM
andRTRIM
toTRIM
.