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

[NSE-1156] fix concat codegen #1163

Merged
merged 4 commits into from
Nov 14, 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 @@ -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