WangGuangxin opened a new pull request, #9077:
URL: https://github.com/apache/incubator-gluten/pull/9077

   ## What changes were proposed in this pull request?
   
   Where both `spark.gluten.supported.hive.udfs` and 
`spark.gluten.sql.columnar.partial.project` rules are applicable, we should 
prioritize `UDFMapping` over `ColumnarPartialProject`.
   
   For example,
   
   ```
   set spark.gluten.supported.hive.udfs=udfB;
   select default.udfA(input1), default.udfB(input2), get_json_object(input3, 
'$.a') from t
   ```
   
   Before this patch, the plan is
   
   ```
   
---------------------------------------------------------------------------------------------------------------------------------
   | ColumnarPartialProject(default.udfA(input1) as _SparkPartialProject0,  
default.udfB(input2) as _SparkPartialProject1, input3) |
   
---------------------------------------------------------------------------------------------------------------------------------
                                                                                
       |
   
---------------------------------------------------------------------------------------------------------------------------------
   |ProjectExecTransformer(_SparkPartialProject0, _SparkPartialProject1, 
get_json_object(input3, '$.a'))|
   
---------------------------------------------------------------------------------------------------------------------------------
   ```
   
   after this patch, the plan is
   ```
   
---------------------------------------------------------------------------------------------------------------------------------
   | ColumnarPartialProject(default.udfA(input1) as _SparkPartialProject0,  
input2, input3)                                        |
   
---------------------------------------------------------------------------------------------------------------------------------
                                                                                
       |
   
---------------------------------------------------------------------------------------------------------------------------------
   |ProjectExecTransformer(_SparkPartialProject0, default.udfB(input2), 
get_json_object(input3, '$.a'))                            |
   
---------------------------------------------------------------------------------------------------------------------------------
   ```
   
   So that the `default.udfB` can be transformed and offload to velox to 
evaluation.
   
   
   
   (Fixes: \#9076)
   
   ## How was this patch tested?
   
   Manually


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to