Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
[NSE-1118] fix codegen on TPCDS Q88 (#1123)
Browse files Browse the repository at this point in the history
* fix codegen on TPCDS Q88

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>

* adding TODO

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>

* adding Q88 back

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
  • Loading branch information
zhouyuan authored Oct 8, 2022
1 parent 7ba0c4c commit 3c0db9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -697,11 +697,12 @@ case class ColumnarHashAggregateExec(
case _ =>
}
val internalExpressionList = expr.aggregateFunction.children
for (expr <- internalExpressionList) {
if (expr.isInstanceOf[Literal]) {
for (internalExpr <- internalExpressionList) {
// TODO(yuan): support sum(1) in codegen
if (internalExpr.isInstanceOf[Literal] && expr.aggregateFunction.isInstanceOf[Sum]) {
return false
}
val colExpr = ColumnarExpressionConverter.replaceWithColumnarExpression(expr)
val colExpr = ColumnarExpressionConverter.replaceWithColumnarExpression(internalExpr)
if (!colExpr.asInstanceOf[ColumnarExpression].supportColumnarCodegen(
Lists.newArrayList())) {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ class TPCDSSuite extends QueryTest with SharedSparkSession {
runner.runTPCQuery("q2", 1, true)
}

test("q88") {
runner.runTPCQuery("q88", 1, true)
}

test("q2 - shj") {
withSQLConf(("spark.oap.sql.columnar.forceshuffledhashjoin", "true")) {
runner.runTPCQuery("q2", 1, true)
Expand Down

0 comments on commit 3c0db9e

Please sign in to comment.