You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by ja...@apache.org on 2024/05/30 08:08:50 UTC

(incubator-gluten) branch main updated: [GLUTEN-5656][CORE][FOLLOWUP] Support GetStructField with NullLiteralNode as subqueries not executing during validation (#5923)

This is an automated email from the ASF dual-hosted git repository.

jackylee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new e5dcbe388 [GLUTEN-5656][CORE][FOLLOWUP] Support GetStructField with NullLiteralNode as subqueries not executing during validation (#5923)
e5dcbe388 is described below

commit e5dcbe3884d5215cc652246476b1ec980c859d4c
Author: Jacky Lee <li...@baidu.com>
AuthorDate: Thu May 30 16:08:45 2024 +0800

    [GLUTEN-5656][CORE][FOLLOWUP] Support GetStructField with NullLiteralNode as subqueries not executing during validation (#5923)
---
 .../scala/org/apache/gluten/expression/ExpressionTransformer.scala   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/backends-velox/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala b/backends-velox/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala
index 0f0eb2969..51b19ab14 100644
--- a/backends-velox/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala
+++ b/backends-velox/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala
@@ -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._
@@ -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.")
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org