public class VisitorDataContext extends java.lang.Object implements DataContext
DataContext.Variable
Modifier and Type | Field and Description |
---|---|
private static CalciteLogger |
LOGGER |
private java.lang.Object[] |
values |
ROOT
Constructor and Description |
---|
VisitorDataContext(java.lang.Object[] values) |
Modifier and Type | Method and 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(RelDataType rowType,
java.util.List<Pair<RexInputRef,RexNode>> usageList) |
static DataContext |
of(RelDataType rowType,
RexNode rex) |
static DataContext |
of(RelNode targetRel,
LogicalFilter queryRel) |
private static RexNode |
removeCast(RexNode inputRef) |
private static final CalciteLogger LOGGER
private final java.lang.Object[] values
public SchemaPlus getRootSchema()
DataContext
getRootSchema
in interface DataContext
public JavaTypeFactory getTypeFactory()
DataContext
getTypeFactory
in interface DataContext
public QueryProvider getQueryProvider()
DataContext
getQueryProvider
in interface DataContext
public java.lang.Object get(java.lang.String name)
DataContext
Supported variables include: "sparkContext", "currentTimestamp", "localTimestamp".
get
in interface DataContext
name
- Name of variablepublic static DataContext of(RelNode targetRel, LogicalFilter queryRel)
public static DataContext of(RelDataType rowType, RexNode rex)
public static DataContext of(RelDataType rowType, java.util.List<Pair<RexInputRef,RexNode>> usageList)
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.