Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
lgbo-ustc committed Feb 25, 2025
1 parent 172638e commit fe580b2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,23 @@ class GlutenCoalesceAggregationUnionSuite extends GlutenClickHouseWholeStageTran
compareResultsAgainstVanillaSpark(sql, true, checkNoUnion, true)
}

test("coalesce project union. case 1") {

val sql =
"""
|select a, x, y, t from (
| select a, x, y, 1 as t from coalesce_union_t1 where b % 2 = 0
| union all
| select a, x, y, 2 as t from coalesce_union_t1 where b % 3 = 1
| union all
| select a, x, y, 3 as t from coalesce_union_t1 where b % 4 = 1
| union all
| select a, x, y, 4 as t from coalesce_union_t1 where b % 5 = 1
|) order by a, x, y, t
|""".stripMargin
compareResultsAgainstVanillaSpark(sql, true, checkNoUnion, true)
}

test("no coalesce project union. case 1") {
val sql =
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ class GlutenDataFrameSetOperationsSuite
override def sparkConf: SparkConf =
super.sparkConf
.set("spark.gluten.sql.columnar.backend.ch.enable.coalesce.project.union", "false")
.set("spark.gluten.sql.columnar.backend.ch.enable.coalesce.aggregation.union", "false")

}
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,8 @@ class ClickHouseTestSettings extends BackendTestSettings {
.exclude("ordering and partitioning reporting")
enableSuite[GlutenDatasetAggregatorSuite]
enableSuite[GlutenDatasetCacheSuite]
// Disable this since coalesece union clauses rule will rewrite the query.
.exclude("SPARK-44653: non-trivial DataFrame unions should not break caching")
enableSuite[GlutenDatasetOptimizationSuite]
enableSuite[GlutenDatasetPrimitiveSuite]
enableSuite[GlutenDatasetSerializerRegistratorSuite]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ class GlutenDataFrameSetOperationsSuite
override def sparkConf: SparkConf =
super.sparkConf
.set("spark.gluten.sql.columnar.backend.ch.enable.coalesce.project.union", "false")
.set("spark.gluten.sql.columnar.backend.ch.enable.coalesce.aggregation.union", "false")

}

0 comments on commit fe580b2

Please sign in to comment.