Skip to content

Commit

Permalink
[GLUTEN-8675][CH] Rewrite union of multiple aggregates into one (#8676)
Browse files Browse the repository at this point in the history
* stage

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
  • Loading branch information
lgbo-ustc authored Feb 11, 2025
1 parent e5652ee commit bb16109
Show file tree
Hide file tree
Showing 4 changed files with 1,217 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ object CHBackendSettings extends BackendSettingsApi with Logging {
CHConfig.prefixOf("convert.left.anti_semi.to.right")
val GLUTEN_CLICKHOUSE_CONVERT_LEFT_ANTI_SEMI_TO_RIGHT_DEFAULT_VALUE: String = "false"

val GLUTEN_ENABLE_COALESCE_AGGREGATION_UNION: String =
CHConf.prefixOf("enable.coalesce.aggregation.union")

def affinityMode: String = {
SparkEnv.get.conf
.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ object CHRuleApi {
(spark, parserInterface) => new GlutenCacheFilesSqlParser(spark, parserInterface))
injector.injectParser(
(spark, parserInterface) => new GlutenClickhouseSqlParser(spark, parserInterface))
injector.injectResolutionRule(spark => new CoalesceAggregationUnion(spark))
injector.injectResolutionRule(spark => new RewriteToDateExpresstionRule(spark))
injector.injectResolutionRule(spark => new RewriteDateTimestampComparisonRule(spark))
injector.injectResolutionRule(spark => new CollapseGetJsonObjectExpressionRule(spark))
Expand Down
Loading

0 comments on commit bb16109

Please sign in to comment.