Skip to content

Commit

Permalink
[GLUTEN-5656][CORE][FOLLOWUP] Support GetStructField with NullLiteral…
Browse files Browse the repository at this point in the history
…Node as subqueries not executing during validation (#5923)
  • Loading branch information
jackylee-ch authored May 30, 2024
1 parent d35d1dc commit e5dcbe3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package org.apache.gluten.expression
import org.apache.gluten.exception.GlutenNotSupportException
import org.apache.gluten.expression.ConverterUtils.FunctionConfig
import org.apache.gluten.expression.ExpressionConverter.replaceWithExpressionTransformer
import org.apache.gluten.substrait.`type`.StructNode
import org.apache.gluten.substrait.expression._

import org.apache.spark.sql.catalyst.expressions._
Expand Down Expand Up @@ -63,6 +64,10 @@ case class VeloxGetStructFieldTransformer(
case node: SelectionNode =>
// Append the nested index to selection node.
node.addNestedChildIdx(JInteger.valueOf(original.ordinal))
case node: NullLiteralNode =>
val nodeType =
node.getTypeNode.asInstanceOf[StructNode].getFieldTypes.get(original.ordinal)
ExpressionBuilder.makeNullLiteral(nodeType)
case other =>
throw new GlutenNotSupportException(s"$other is not supported.")
}
Expand Down

0 comments on commit e5dcbe3

Please sign in to comment.