Package org.apache.calcite.plan
Class VisitorDataContext
- java.lang.Object
-
- org.apache.calcite.plan.VisitorDataContext
-
- All Implemented Interfaces:
DataContext
public class VisitorDataContext extends java.lang.Object implements DataContext
DataContext for evaluating an RexExpression
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.calcite.DataContext
DataContext.Variable
-
-
Field Summary
Fields Modifier and Type Field Description private static CalciteLogger
LOGGER
private java.lang.Object[]
values
-
Fields inherited from interface org.apache.calcite.DataContext
ROOT
-
-
Constructor Summary
Constructors Constructor Description VisitorDataContext(java.lang.Object[] values)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(java.lang.String name)
Returns a context variable.QueryProvider
getQueryProvider()
Returns the query provider.SchemaPlus
getRootSchema()
Returns a sub-schema with a given name, or null.JavaTypeFactory
getTypeFactory()
Returns the type factory.static Pair<java.lang.Integer,?>
getValue(RexNode inputRef, RexNode literal)
static DataContext
of(RelNode targetRel, LogicalFilter queryRel)
static DataContext
of(RelDataType rowType, java.util.List<Pair<RexInputRef,RexNode>> usageList)
static DataContext
of(RelDataType rowType, RexNode rex)
private static RexNode
removeCast(RexNode inputRef)
-
-
-
Field Detail
-
LOGGER
private static final CalciteLogger LOGGER
-
values
private final java.lang.Object[] values
-
-
Method Detail
-
getRootSchema
public SchemaPlus getRootSchema()
Description copied from interface:DataContext
Returns a sub-schema with a given name, or null.- Specified by:
getRootSchema
in interfaceDataContext
-
getTypeFactory
public JavaTypeFactory getTypeFactory()
Description copied from interface:DataContext
Returns the type factory.- Specified by:
getTypeFactory
in interfaceDataContext
-
getQueryProvider
public QueryProvider getQueryProvider()
Description copied from interface:DataContext
Returns the query provider.- Specified by:
getQueryProvider
in interfaceDataContext
-
get
public java.lang.Object get(java.lang.String name)
Description copied from interface:DataContext
Returns a context variable.Supported variables include: "sparkContext", "currentTimestamp", "localTimestamp".
- Specified by:
get
in interfaceDataContext
- Parameters:
name
- Name of variable
-
of
public static DataContext of(RelNode targetRel, LogicalFilter queryRel)
-
of
public static DataContext of(RelDataType rowType, RexNode rex)
-
of
public static DataContext of(RelDataType rowType, java.util.List<Pair<RexInputRef,RexNode>> usageList)
-
-