Package org.apache.druid.sql.calcite.rule
package org.apache.druid.sql.calcite.rule
-
ClassDescriptionModified version of Calcite's
AggregateMergeRule, with two changes: (1) Includes a workaround for https://issues.apache.org/jira/browse/CALCITE-7162 (2) Includes the ability to merge twoAggregatewith aProjectbetween them, by pushing theProjectbelow the new mergedAggregate.Implementation matching an Aggregate on top of an Aggregate without any intervening Project.Implementation matching an Aggregate on top of an Aggregate with an intervening Project.Rule that pullsQueryLookupOperatorConversion.SQL_FUNCTIONup through anAggregate.Rule that un-does the rewrite fromSqlCoalesceFunction.rewriteCall(org.apache.calcite.sql.validate.SqlValidator, org.apache.calcite.sql.SqlCall).Rule that rewritesCOALESCE(LOOKUP(x, 'lookupName'), 'missingValue')toLOOKUP(x, 'lookupName', 'missingValue').Druid extension ofAggregateCaseToFilterRule.This class creates the rule to abide by for creating correlations during unnest.DruidRules.DruidQueryRule<RelType extends org.apache.calcite.rel.RelNode>Rule that pushes LIMIT and OFFSET into aDruidUnionRel.Creates aDruidUnionDataSourceRelfrom variousDruidQueryRelinputs that represent simple table scans.Rule that creates aDruidUnionRelfrom someDruidRelinputs.This class creates the rule to abide by for creating unnest (internally uncollect) in Calcite.This interface provides a way to supply custom calcite planning rules from extensions.Transform calls like f(COALESCE(x, y)) => (x IS NOT NULL AND f(x)) OR (x IS NULL AND f(y)), for boolean functions f.Transform calls like [CONCAT(x, '-', y) = 'a-b'] => [x = 'a' AND y = 'b'].FilterJoinExcludePushToChildRule<C extends org.apache.calcite.rel.rules.FilterJoinRule.Config>This class is a copy (with modification) ofFilterJoinRule.Rule that tries to push filter expressions into a join condition.Rewrites comparisions to avoid bug FIXME.Flattens calls to CONCAT.Rule that prunes unused aggregators after a projection.Eliminates calls toQueryLookupOperatorConversion.SQL_FUNCTIONby doing reverse-lookups.Rewrites exotic cases of FIRST_VALUE/LAST_VALUE to simpler plans.Collapses two adjacent Sort operations together.