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

Commit

Permalink
[NSE-1196] Fix: concat with only one expression
Browse files Browse the repository at this point in the history
Support concat() with only one expression. 
here is a little sample "select concat(expr) from table"
  • Loading branch information
jackylee-ch authored Jan 4, 2023
1 parent f2fa991 commit 5ed2845
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ class ColumnarConcat(exps: Seq[Expression], original: Expression)
}

override def doColumnarCodeGen(args: java.lang.Object): (TreeNode, ArrowType) = {
if (exps.size == 1) {
val (exp_node, expType): (TreeNode, ArrowType) =
exps.head.asInstanceOf[ColumnarExpression].doColumnarCodeGen(args)
return (exp_node, expType)
}

val iter: Iterator[Expression] = exps.iterator
val exp = iter.next()
val iterFaster: Iterator[Expression] = exps.iterator
Expand Down

0 comments on commit 5ed2845

Please sign in to comment.