Search in sources :

Example 36 with SubQueryResults

use of io.crate.planner.operators.SubQueryResults in project crate by crate.

the class AlterTableAddColumnPlan method executeOrFail.

@Override
public void executeOrFail(DependencyCarrier dependencies, PlannerContext plannerContext, RowConsumer consumer, Row params, SubQueryResults subQueryResults) throws Exception {
    BoundAddColumn stmt = bind(alterTable, plannerContext.transactionContext(), dependencies.nodeContext(), params, subQueryResults, dependencies.fulltextAnalyzerResolver());
    dependencies.alterTableOperation().executeAlterTableAddColumn(stmt).whenComplete(new OneRowActionListener<>(consumer, rCount -> new Row1(rCount == null ? -1 : rCount)));
}
Also used : AnalyzedColumnDefinition(io.crate.analyze.AnalyzedColumnDefinition) HashMap(java.util.HashMap) ObjectType(io.crate.types.ObjectType) Function(java.util.function.Function) ArrayList(java.util.ArrayList) DependencyCarrier(io.crate.planner.DependencyCarrier) SymbolEvaluator(io.crate.analyze.SymbolEvaluator) Settings(org.elasticsearch.common.settings.Settings) Locale(java.util.Locale) Map(java.util.Map) OneRowActionListener(io.crate.execution.support.OneRowActionListener) AnalyzedAlterTableAddColumn(io.crate.analyze.AnalyzedAlterTableAddColumn) FulltextAnalyzerResolver(io.crate.metadata.FulltextAnalyzerResolver) LinkedHashSet(java.util.LinkedHashSet) DocSysColumns(io.crate.metadata.doc.DocSysColumns) DocTableInfo(io.crate.metadata.doc.DocTableInfo) TableInfo(io.crate.metadata.table.TableInfo) NodeContext(io.crate.metadata.NodeContext) BoundAddColumn(io.crate.analyze.BoundAddColumn) ColumnIdent(io.crate.metadata.ColumnIdent) Reference(io.crate.metadata.Reference) CheckConstraint(io.crate.sql.tree.CheckConstraint) RowConsumer(io.crate.data.RowConsumer) Objects(java.util.Objects) AnalyzedTableElements(io.crate.analyze.AnalyzedTableElements) List(java.util.List) Row(io.crate.data.Row) Symbol(io.crate.expression.symbol.Symbol) PlannerContext(io.crate.planner.PlannerContext) Plan(io.crate.planner.Plan) SubQueryResults(io.crate.planner.operators.SubQueryResults) VisibleForTesting(io.crate.common.annotations.VisibleForTesting) Comparator(java.util.Comparator) Row1(io.crate.data.Row1) CoordinatorTxnCtx(io.crate.metadata.CoordinatorTxnCtx) Row1(io.crate.data.Row1) BoundAddColumn(io.crate.analyze.BoundAddColumn)

Aggregations

SubQueryResults (io.crate.planner.operators.SubQueryResults)36 Row (io.crate.data.Row)34 RowConsumer (io.crate.data.RowConsumer)33 PlannerContext (io.crate.planner.PlannerContext)32 DependencyCarrier (io.crate.planner.DependencyCarrier)31 Plan (io.crate.planner.Plan)31 Row1 (io.crate.data.Row1)30 OneRowActionListener (io.crate.execution.support.OneRowActionListener)30 SymbolEvaluator (io.crate.analyze.SymbolEvaluator)25 Symbol (io.crate.expression.symbol.Symbol)25 Function (java.util.function.Function)25 VisibleForTesting (io.crate.common.annotations.VisibleForTesting)20 NodeContext (io.crate.metadata.NodeContext)19 CoordinatorTxnCtx (io.crate.metadata.CoordinatorTxnCtx)18 Settings (org.elasticsearch.common.settings.Settings)17 List (java.util.List)13 DocTableInfo (io.crate.metadata.doc.DocTableInfo)11 ArrayList (java.util.ArrayList)10 Table (io.crate.sql.tree.Table)9 Lists2 (io.crate.common.collections.Lists2)8