Skip to content

Commit

Permalink
[GLUTEN-6981][CH]Not supported operator TakeOrderedAndProjectExecTran…
Browse files Browse the repository at this point in the history
…sformer for BroadcastRelation (#6982)
  • Loading branch information
loudongfeng authored Aug 23, 2024
1 parent af512a0 commit 1844761
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ class CHSparkPlanExecApi extends SparkPlanExecApi with Logging {
wrapChild(r2c)
case union: ColumnarUnionExec =>
wrapChild(union)
case ordered: TakeOrderedAndProjectExecTransformer =>
wrapChild(ordered)
case other =>
throw new GlutenNotSupportException(
s"Not supported operator ${other.nodeName} for BroadcastRelation")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,5 +336,22 @@ class GlutenClickHouseTPCDSParquetSuite extends GlutenClickHouseTPCDSAbstractSui
compareResultsAgainstVanillaSpark(sql5, compareResult = true, _ => {})
}

test("TakeOrderedAndProjectExecTransformer in broadcastRelation") {
val q =
"""
| with dd as (
| select d_date_sk, count(*) as cn
| from date_dim
| where d_date_sk is not null
| group by d_date_sk
| order by cn desc
| limit 10)
| select count(ss.ss_sold_date_sk)
| from store_sales ss, dd
| where ss_sold_date_sk=dd.d_date_sk+1
|""".stripMargin
runQueryAndCompare(q)(checkGlutenOperatorMatch[TakeOrderedAndProjectExecTransformer])
}

}
// scalastyle:on line.size.limit

0 comments on commit 1844761

Please sign in to comment.