Package org.apache.calcite.interpreter
Class Interpreter
- java.lang.Object
-
- org.apache.calcite.linq4j.DefaultEnumerable<T>
-
- org.apache.calcite.linq4j.AbstractEnumerable<java.lang.Object[]>
-
- org.apache.calcite.interpreter.Interpreter
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.lang.Iterable<java.lang.Object[]>
,Enumerable<java.lang.Object[]>
,ExtendedEnumerable<java.lang.Object[]>
,ExtendedOrderedEnumerable<java.lang.Object[]>
,OrderedEnumerable<java.lang.Object[]>
,RawEnumerable<java.lang.Object[]>
public class Interpreter extends AbstractEnumerable<java.lang.Object[]> implements java.lang.AutoCloseable
Interpreter.Contains the context for interpreting relational expressions. In particular it holds working state while the data flow graph is being assembled.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Interpreter.CompilerImpl
private static class
Interpreter.DuplicatingSink
Implementation ofSink
using aArrayDeque
.(package private) static class
Interpreter.Edge
Edge between aRelNode
and one of its inputs.private static class
Interpreter.EnumeratorSource
ASource
that is just backed by anEnumerator
.private class
Interpreter.FooCompiler
Not used.private static class
Interpreter.ListSink
Implementation ofSink
using aArrayDeque
.private static class
Interpreter.ListSource
Implementation ofSource
using aArrayDeque
.private static class
Interpreter.NodeInfo
Information about a node registered in the data flow graph.(package private) static interface
Interpreter.ScalarCompiler
Converts a list of expressions to a scalar that can compute their values.
-
Field Summary
Fields Modifier and Type Field Description private DataContext
dataContext
private java.util.Map<RelNode,Interpreter.NodeInfo>
nodes
private RelNode
rootRel
-
Constructor Summary
Constructors Constructor Description Interpreter(DataContext dataContext, RelNode rootRel)
Creates an Interpreter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Enumerator<java.lang.Object[]>
enumerator()
Returns an enumerator that iterates through a collection.private RelNode
optimize(RelNode rootRel)
private void
start()
-
Methods inherited from class org.apache.calcite.linq4j.AbstractEnumerable
iterator
-
Methods inherited from class org.apache.calcite.linq4j.DefaultEnumerable
aggregate, aggregate, aggregate, all, any, any, asEnumerable, asOrderedQueryable, asQueryable, average, average, average, average, average, average, average, average, average, average, cast, concat, contains, contains, correlateJoin, count, count, createOrderedEnumerable, defaultIfEmpty, defaultIfEmpty, distinct, distinct, elementAt, elementAtOrDefault, except, except, first, first, firstOrDefault, firstOrDefault, foreach, getThis, getThisOrdered, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupJoin, groupJoin, intersect, intersect, into, join, join, join, last, last, lastOrDefault, lastOrDefault, longCount, longCount, max, max, max, max, max, max, max, max, max, max, max, max, min, min, min, min, min, min, min, min, min, min, min, min, ofType, orderBy, orderBy, orderByDescending, orderByDescending, removeAll, reverse, select, select, selectMany, selectMany, selectMany, selectMany, sequenceEqual, sequenceEqual, single, single, singleOrDefault, singleOrDefault, skip, skipWhile, skipWhile, sum, sum, sum, sum, sum, sum, sum, sum, sum, sum, take, takeWhile, takeWhile, thenBy, thenBy, thenByDescending, thenByDescending, toList, toLookup, toLookup, toLookup, toLookup, toMap, toMap, toMap, toMap, union, union, where, where, zip
-
-
-
-
Field Detail
-
nodes
private final java.util.Map<RelNode,Interpreter.NodeInfo> nodes
-
dataContext
private final DataContext dataContext
-
rootRel
private final RelNode rootRel
-
-
Constructor Detail
-
Interpreter
public Interpreter(DataContext dataContext, RelNode rootRel)
Creates an Interpreter.
-
-
Method Detail
-
enumerator
public Enumerator<java.lang.Object[]> enumerator()
Description copied from interface:RawEnumerable
Returns an enumerator that iterates through a collection.- Specified by:
enumerator
in interfaceRawEnumerable<java.lang.Object[]>
-
start
private void start()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-