public class DruidUnionRel extends DruidRel<DruidUnionRel>
DruidRel. Note that this rel doesn't represent a real native query,
but rather, it represents the concatenation of a series of native queries in the SQL layer. Therefore,
getPartialDruidQuery() returns null, and this rel cannot be built on top of. It must be the outer rel in a
query plan.
See DruidUnionDataSourceRel for a version that does a regular Druid query using a UnionDataSource.
In the future we expect that UnionDataSource will gain the ability to union query datasources together, and
then this rel could be replaced by DruidUnionDataSourceRel.| Modifier and Type | Method and Description |
|---|---|
DruidUnionRel |
asDruidConvention() |
org.apache.calcite.plan.RelOptCost |
computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner,
org.apache.calcite.rel.metadata.RelMetadataQuery mq) |
org.apache.calcite.rel.RelNode |
copy(org.apache.calcite.plan.RelTraitSet traitSet,
List<org.apache.calcite.rel.RelNode> inputs) |
static DruidUnionRel |
create(PlannerContext plannerContext,
org.apache.calcite.rel.type.RelDataType rowType,
List<org.apache.calcite.rel.RelNode> rels,
int limit) |
protected org.apache.calcite.rel.type.RelDataType |
deriveRowType() |
org.apache.calcite.rel.RelWriter |
explainTerms(org.apache.calcite.rel.RelWriter pw) |
Set<String> |
getDataSourceNames()
Get the set of names of table datasources read by this DruidRel
|
List<org.apache.calcite.rel.RelNode> |
getInputs() |
int |
getLimit() |
PartialDruidQuery |
getPartialDruidQuery()
Returns the PartialDruidQuery associated with this DruidRel, and which can be built on top of.
|
void |
replaceInput(int ordinalInParent,
org.apache.calcite.rel.RelNode p) |
Sequence<Object[]> |
runQuery() |
DruidQuery |
toDruidQuery(boolean finalizeAggregations)
Convert this DruidRel to a DruidQuery.
|
DruidQuery |
toDruidQueryForExplaining()
Convert this DruidRel to a DruidQuery for purposes of explaining.
|
DruidUnionRel |
withPartialQuery(PartialDruidQuery newQueryBuilder) |
getPlannerContext, isValidDruidQueryaccept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, equals, estimateRowCount, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, hashCode, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, sole, toStringpublic static DruidUnionRel create(PlannerContext plannerContext, org.apache.calcite.rel.type.RelDataType rowType, List<org.apache.calcite.rel.RelNode> rels, int limit)
@Nullable public PartialDruidQuery getPartialDruidQuery()
DruidRelgetPartialDruidQuery in class DruidRel<DruidUnionRel>public Sequence<Object[]> runQuery()
runQuery in class DruidRel<DruidUnionRel>public DruidUnionRel withPartialQuery(PartialDruidQuery newQueryBuilder)
withPartialQuery in class DruidRel<DruidUnionRel>public DruidQuery toDruidQuery(boolean finalizeAggregations)
DruidReltoDruidQuery in class DruidRel<DruidUnionRel>finalizeAggregations - true if this query should include explicit finalization for all of its
aggregators, where required. Useful for subqueries where Druid's native query layer
does not do this automatically.public DruidQuery toDruidQueryForExplaining()
DruidReltoDruidQueryForExplaining in class DruidRel<DruidUnionRel>public DruidUnionRel asDruidConvention()
asDruidConvention in class DruidRel<DruidUnionRel>public List<org.apache.calcite.rel.RelNode> getInputs()
getInputs in interface org.apache.calcite.plan.RelOptNodegetInputs in interface org.apache.calcite.rel.RelNodegetInputs in class org.apache.calcite.rel.AbstractRelNodepublic void replaceInput(int ordinalInParent,
org.apache.calcite.rel.RelNode p)
replaceInput in interface org.apache.calcite.rel.RelNodereplaceInput in class org.apache.calcite.rel.AbstractRelNodepublic org.apache.calcite.rel.RelNode copy(org.apache.calcite.plan.RelTraitSet traitSet,
List<org.apache.calcite.rel.RelNode> inputs)
copy in interface org.apache.calcite.rel.RelNodecopy in class org.apache.calcite.rel.AbstractRelNodepublic Set<String> getDataSourceNames()
DruidRelgetDataSourceNames in class DruidRel<DruidUnionRel>public org.apache.calcite.rel.RelWriter explainTerms(org.apache.calcite.rel.RelWriter pw)
explainTerms in class org.apache.calcite.rel.AbstractRelNodeprotected org.apache.calcite.rel.type.RelDataType deriveRowType()
deriveRowType in class org.apache.calcite.rel.AbstractRelNodepublic org.apache.calcite.plan.RelOptCost computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner,
org.apache.calcite.rel.metadata.RelMetadataQuery mq)
computeSelfCost in interface org.apache.calcite.rel.RelNodecomputeSelfCost in class org.apache.calcite.rel.AbstractRelNodepublic int getLimit()
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.