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

[NSE-1118] fix codegen on TPCDS Q88 #1123

Merged
merged 3 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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