Package org.apache.calcite.test
Class MockDdlExecutor
java.lang.Object
org.apache.calcite.server.DdlExecutorImpl
org.apache.calcite.test.MockDdlExecutor
- All Implemented Interfaces:
DdlExecutor
,ReflectiveVisitor
Executes the few DDL commands.
-
Field Summary
Fields inherited from interface org.apache.calcite.server.DdlExecutor
USELESS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(SqlCreateTable create, CalcitePrepare.Context context) Executes aCREATE TABLE
command.void
execute
(SqlCreateView create, CalcitePrepare.Context context) Executes aCREATE VIEW
command.protected void
forEachNameType
(SqlCreateTable createTable, BiConsumer<SqlIdentifier, SqlDataTypeSpec> consumer) Calls an action for each (name, type) pair fromSqlCreateTable::columnList
, in which they alternate.protected static void
populate
(SqlIdentifier name, SqlNode query, CalcitePrepare.Context context) Populates the table calledname
by executingquery
.Methods inherited from class org.apache.calcite.server.DdlExecutorImpl
execute, executeDdl
-
Constructor Details
-
MockDdlExecutor
public MockDdlExecutor()
-
-
Method Details
-
execute
Executes aCREATE TABLE
command. Called via reflection. -
execute
Executes aCREATE VIEW
command. -
populate
Populates the table calledname
by executingquery
. -
forEachNameType
protected void forEachNameType(SqlCreateTable createTable, BiConsumer<SqlIdentifier, SqlDataTypeSpec> consumer) Calls an action for each (name, type) pair fromSqlCreateTable::columnList
, in which they alternate.
-