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

Commit

Permalink
[NSE-1156] fix concat codegen (#1163)
Browse files Browse the repository at this point in the history
* fix concat codegen

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

* disable on unsupported case

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

* fix count distinct

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

* revert

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

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
  • Loading branch information
zhouyuan authored Nov 14, 2022
1 parent a8b38cd commit e636428
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ case class ColumnarHashAggregateExec(
}
case Count(_) =>
mode match {
case Final if (exp.isDistinct) =>
throw new UnsupportedOperationException(
s"Count distinct is not supported in Columnar Count")
case Partial | PartialMerge | Final =>
res_index += 1
case other =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ class ColumnarCoalesce(exps: Seq[Expression], original: Expression)
with ColumnarExpression
with Logging {

override def supportColumnarCodegen(args: java.lang.Object): Boolean = {
for (expr <- exps) {
val colExpr = ColumnarExpressionConverter.replaceWithColumnarExpression(expr)
if (!colExpr.asInstanceOf[ColumnarExpression].supportColumnarCodegen(Lists.newArrayList())) {
return false
}
}
return true
}

buildCheck()

def buildCheck(): Unit = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class ColumnarConcat(exps: Seq[Expression], original: Expression)
with ColumnarExpression
with Logging {

override def supportColumnarCodegen(args: java.lang.Object): Boolean = {
false
}

buildCheck()

def buildCheck(): Unit = {
Expand Down

0 comments on commit e636428

Please sign in to comment.