Package org.apache.calcite.prepare
Class Prepare.PreparedExplain
- java.lang.Object
-
- org.apache.calcite.prepare.Prepare.PreparedExplain
-
- All Implemented Interfaces:
Prepare.PreparedResult
- Direct Known Subclasses:
CalcitePrepareImpl.CalcitePreparedExplain
- Enclosing class:
- Prepare
public abstract static class Prepare.PreparedExplain extends java.lang.Object implements Prepare.PreparedResult
PreparedExplanation is a PreparedResult for an EXPLAIN PLAN statement. It's always good to have an explanation prepared.
-
-
Field Summary
Fields Modifier and Type Field Description private SqlExplainLevel
detailLevel
private SqlExplainFormat
format
private RelDataType
parameterRowType
private RelRoot
root
private RelDataType
rowType
-
Constructor Summary
Constructors Constructor Description PreparedExplain(RelDataType rowType, RelDataType parameterRowType, RelRoot root, SqlExplainFormat format, SqlExplainLevel detailLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCode()
Returns the code generated by preparation.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.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
-
-
-
-
Field Detail
-
rowType
private final RelDataType rowType
-
parameterRowType
private final RelDataType parameterRowType
-
root
private final RelRoot root
-
format
private final SqlExplainFormat format
-
detailLevel
private final SqlExplainLevel detailLevel
-
-
Constructor Detail
-
PreparedExplain
public PreparedExplain(RelDataType rowType, RelDataType parameterRowType, RelRoot root, SqlExplainFormat format, SqlExplainLevel detailLevel)
-
-
Method Detail
-
getCode
public java.lang.String getCode()
Description copied from interface:Prepare.PreparedResult
Returns the code generated by preparation.- Specified by:
getCode
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
-
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
-
-