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

richox pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/auron.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ec17a0f [AURON-1299] Optimize the comments for the get_json_object 
UDF (#1300)
4ec17a0f is described below

commit 4ec17a0fbf233053fba57f70dc0fce3bb6bc3b61
Author: zhangmang <[email protected]>
AuthorDate: Mon Sep 15 16:12:15 2025 +0800

    [AURON-1299] Optimize the comments for the get_json_object UDF (#1300)
---
 .../main/scala/org/apache/spark/sql/auron/NativeConverters.scala   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala
 
b/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala
index a577502d..78745a74 100644
--- 
a/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala
+++ 
b/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala
@@ -1027,7 +1027,6 @@ object NativeConverters extends Logging {
           _.setRowNumExpr(pb.RowNumExprNode.newBuilder())
         }
 
-      // hive UDFJson
       // hive UDFJson
       case e
           if udfJsonEnabled && (
@@ -1036,7 +1035,11 @@ object NativeConverters extends Logging {
           )
             && e.children.map(_.dataType) == Seq(StringType, StringType)
             && e.children(1).isInstanceOf[Literal] =>
-        // use GetParsedJsonObject + ParseJson for reusing parsed json value 
in native
+        // Auron will convert the call to get_json_object(json_str, '$.path') 
into two function calls:
+        // the first step parse json_str into a JSON object,
+        // the second step extracts the value of path from the JSON object.
+        // The benefit of this approach is that if there are multiple calls,
+        // the JSON object can be reused, which can significantly improve 
performance.
         val parsed = Shims.get.createNativeExprWrapper(
           buildExtScalarFunction("ParseJson", e.children(0) :: Nil, 
BinaryType),
           BinaryType,

Reply via email to