Skip to content

Commit

Permalink
fix window
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Zhou <[email protected]>
  • Loading branch information
zhouyuan committed Sep 5, 2022
1 parent f5f5aab commit 32dfc62
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,7 @@ case class ColumnarWindowExec(windowExpression: Seq[NamedExpression],
val attr = ConverterUtils.getAttrFromExpr(orderSpec.head.child, true)
TreeBuilder.makeFunction(row_number_func,
List(TreeBuilder.makeField(
Field.nullable(attr.name,
CodeGeneration.getResultType(attr.dataType)))).toList.asJava,
ConverterUtils.createArrowField(attr))).toList.asJava,
NoneType.NONE_TYPE
)
case (n, f) =>
Expand All @@ -255,8 +254,7 @@ case class ColumnarWindowExec(windowExpression: Seq[NamedExpression],
.flatMap {
case a: AttributeReference =>
Some(TreeBuilder.makeField(
Field.nullable(a.name,
CodeGeneration.getResultType(a.dataType))))
ConverterUtils.createArrowField(a)))
case c: Cast if c.child.isInstanceOf[AttributeReference] =>
Some(TreeBuilder.makeField(
Field.nullable(c.child.asInstanceOf[AttributeReference].name,
Expand All @@ -281,8 +279,7 @@ case class ColumnarWindowExec(windowExpression: Seq[NamedExpression],

val gPartitionSpec = TreeBuilder.makeFunction("partitionSpec",
groupingExpressions.map(e => TreeBuilder.makeField(
Field.nullable(e.name,
CodeGeneration.getResultType(e.dataType)))).toList.asJava,
ConverterUtils.createArrowField(e))).toList.asJava,
NoneType.NONE_TYPE)
// Workaround:
// Gandiva doesn't support serializing Struct type so far. Use a fake Binary type instead.
Expand Down

0 comments on commit 32dfc62

Please sign in to comment.