Package org.apache.calcite.prepare
Class Prepare.PreparedResultImpl
- java.lang.Object
-
- org.apache.calcite.prepare.Prepare.PreparedResultImpl
-
- All Implemented Interfaces:
Prepare.PreparedResult
,Typed
- Enclosing class:
- Prepare
public abstract static class Prepare.PreparedResultImpl extends java.lang.Object implements Prepare.PreparedResult, Typed
Abstract implementation ofPrepare.PreparedResult
.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<RelCollation>
collations
protected java.util.List<java.util.List<java.lang.String>>
fieldOrigins
protected boolean
isDml
protected RelDataType
parameterRowType
protected RelNode
rootRel
protected RelDataType
rowType
protected TableModify.Operation
tableModOp
-
Constructor Summary
Constructors Constructor Description PreparedResultImpl(RelDataType rowType, RelDataType parameterRowType, java.util.List<java.util.List<java.lang.String>> fieldOrigins, java.util.List<RelCollation> collations, RelNode rootRel, TableModify.Operation tableModOp, boolean isDml)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.reflect.Type
getElementType()
Gets the type of the element(s) that are returned in this collection.java.util.List<java.util.List<java.lang.String>>
getFieldOrigins()
Returns a list describing, for each result field, the origin of the field as a 4-element list of (database, schema, table, column).RelDataType
getParameterRowType()
Returns a record type whose fields are the parameters of this statement.RelDataType
getPhysicalRowType()
Returns the physical row type of this prepared statement.RelNode
getRootRel()
TableModify.Operation
getTableModOp()
Returns the table modification operation corresponding to this statement if it is a table modification statement; otherwise null.boolean
isDml()
Returns whether this result is for a DML statement, in which case the result set is one row with one column containing the number of rows affected.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.calcite.prepare.Prepare.PreparedResult
getBindable, getCode
-
-
-
-
Field Detail
-
rootRel
protected final RelNode rootRel
-
parameterRowType
protected final RelDataType parameterRowType
-
rowType
protected final RelDataType rowType
-
isDml
protected final boolean isDml
-
tableModOp
protected final TableModify.Operation tableModOp
-
fieldOrigins
protected final java.util.List<java.util.List<java.lang.String>> fieldOrigins
-
collations
protected final java.util.List<RelCollation> collations
-
-
Constructor Detail
-
PreparedResultImpl
public PreparedResultImpl(RelDataType rowType, RelDataType parameterRowType, java.util.List<java.util.List<java.lang.String>> fieldOrigins, java.util.List<RelCollation> collations, RelNode rootRel, TableModify.Operation tableModOp, boolean isDml)
-
-
Method Detail
-
isDml
public boolean isDml()
Description copied from interface:Prepare.PreparedResult
Returns whether this result is for a DML statement, in which case the result set is one row with one column containing the number of rows affected.- Specified by:
isDml
in interfacePrepare.PreparedResult
-
getTableModOp
public TableModify.Operation getTableModOp()
Description copied from interface:Prepare.PreparedResult
Returns the table modification operation corresponding to this statement if it is a table modification statement; otherwise null.- Specified by:
getTableModOp
in interfacePrepare.PreparedResult
-
getFieldOrigins
public java.util.List<java.util.List<java.lang.String>> getFieldOrigins()
Description copied from interface:Prepare.PreparedResult
Returns a list describing, for each result field, the origin of the field as a 4-element list of (database, schema, table, column).- Specified by:
getFieldOrigins
in interfacePrepare.PreparedResult
-
getParameterRowType
public RelDataType getParameterRowType()
Description copied from interface:Prepare.PreparedResult
Returns a record type whose fields are the parameters of this statement.- Specified by:
getParameterRowType
in interfacePrepare.PreparedResult
-
getPhysicalRowType
public RelDataType getPhysicalRowType()
Returns the physical row type of this prepared statement. May not be identical to the row type returned by the validator; for example, the field names may have been made unique.
-
getElementType
public abstract java.lang.reflect.Type getElementType()
Description copied from interface:Typed
Gets the type of the element(s) that are returned in this collection.- Specified by:
getElementType
in interfaceTyped
-
getRootRel
public RelNode getRootRel()
-
-