Class SplunkTableScan
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.core.TableScan
-
- org.apache.calcite.adapter.splunk.SplunkTableScan
-
- All Implemented Interfaces:
java.lang.Cloneable
,EnumerableRel
,RelOptNode
,RelNode
public class SplunkTableScan extends TableScan implements EnumerableRel
Relational expression representing a scan of Splunk.Splunk does not have tables, but it's easiest to imagine that a Splunk instance is one large table. This "table" does not have a fixed set of columns (Splunk calls them "fields") but each query specifies the fields that it wants. It also specifies a search expression, and optionally earliest and latest dates.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.calcite.adapter.enumerable.EnumerableRel
EnumerableRel.Prefer, EnumerableRel.Result
-
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
earliest
(package private) java.util.List<java.lang.String>
fieldList
(package private) java.lang.String
latest
private static java.lang.reflect.Method
METHOD
(package private) java.lang.String
search
(package private) SplunkTable
splunkTable
-
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
Fields inherited from interface org.apache.calcite.adapter.enumerable.EnumerableRel
FILTER_FACTORY, PROJECT_FACTORY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SplunkTableScan(RelOptCluster cluster, RelOptTable table, SplunkTable splunkTable, java.lang.String search, java.lang.String earliest, java.lang.String latest, java.util.List<java.lang.String> fieldList)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static Expression
constantStringList(java.util.List<java.lang.String> strings)
RelDataType
deriveRowType()
RelWriter
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.EnumerableRel.Result
implement(EnumerableRelImplementor implementor, EnumerableRel.Prefer pref)
Creates a plan for this expression according to a calling convention.void
register(RelOptPlanner planner)
Registers any special rules specific to this kind of relational expression.-
Methods inherited from class org.apache.calcite.rel.core.TableScan
accept, computeSelfCost, estimateRowCount, getCollationList, getTable, identity, identity, project
-
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, copy, explain, getChildExps, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getQuery, getRelTypeName, getRows, getRowType, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, replaceInput, sole, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.calcite.rel.RelNode
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, computeSelfCost, copy, estimateRowCount, explain, getChildExps, getCollationList, getConvention, getCorrelVariable, getExpectedInputRowType, getInput, getInputs, getQuery, getRelTypeName, getRows, getRowType, getTable, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, replaceInput
-
Methods inherited from interface org.apache.calcite.plan.RelOptNode
getCluster, getDescription, getDigest, getId, getTraitSet
-
-
-
-
Field Detail
-
splunkTable
final SplunkTable splunkTable
-
search
final java.lang.String search
-
earliest
final java.lang.String earliest
-
latest
final java.lang.String latest
-
fieldList
final java.util.List<java.lang.String> fieldList
-
METHOD
private static final java.lang.reflect.Method METHOD
-
-
Constructor Detail
-
SplunkTableScan
protected SplunkTableScan(RelOptCluster cluster, RelOptTable table, SplunkTable splunkTable, java.lang.String search, java.lang.String earliest, java.lang.String latest, java.util.List<java.lang.String> fieldList)
-
-
Method Detail
-
explainTerms
public RelWriter explainTerms(RelWriter pw)
Description copied from class:AbstractRelNode
Describes the inputs and attributes of this relational expression. Each node should callsuper.explainTerms
, then call theRelWriterImpl.input(String, RelNode)
andRelWriterImpl.item(String, Object)
methods for each input and attribute.- Overrides:
explainTerms
in classTableScan
- Parameters:
pw
- Plan writer- Returns:
- Plan writer for fluent-explain pattern
-
register
public void register(RelOptPlanner planner)
Description copied from interface:RelNode
Registers any special rules specific to this kind of relational expression.The planner calls this method this first time that it sees a relational expression of this class. The derived class should call
RelOptPlanner.addRule(org.apache.calcite.plan.RelOptRule)
for each rule, and then callsuper.register
.- Specified by:
register
in interfaceRelNode
- Overrides:
register
in classAbstractRelNode
- Parameters:
planner
- Planner to be used to register additional relational expressions
-
deriveRowType
public RelDataType deriveRowType()
- Overrides:
deriveRowType
in classTableScan
-
implement
public EnumerableRel.Result implement(EnumerableRelImplementor implementor, EnumerableRel.Prefer pref)
Description copied from interface:EnumerableRel
Creates a plan for this expression according to a calling convention.- Specified by:
implement
in interfaceEnumerableRel
- Parameters:
implementor
- Implementorpref
- Preferred representation for rows in result expression- Returns:
- Plan for this expression according to a calling convention
-
constantStringList
private static Expression constantStringList(java.util.List<java.lang.String> strings)
-
-