Copilot commented on code in PR #1779:
URL: https://github.com/apache/auron/pull/1779#discussion_r2712244728


##########
spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala:
##########
@@ -288,6 +292,10 @@ object NativeConverters extends Logging {
       throw new NotImplementedError(s"unsupported expression: (${e.getClass}) 
$e")
     }
 
+    if (!singleChildFallbackEnabled) {
+      return convertExprWithFallback(sparkExpr, isPruningExpr = false, 
fallbackToError)
+    }
+
     try {

Review Comment:
   The early return bypasses the catch block (lines 334-383) that handles 
NotImplementedError exceptions and creates SparkUDFWrapperExpr for unsupported 
expressions. When singleChildFallbackEnabled is false, any unsupported 
expression will throw an uncaught NotImplementedError instead of falling back 
to Spark's execution. 
   
   The code should instead skip only the single-child optimization logic (lines 
299-332) while still allowing the catch block to handle failures. Consider 
moving this check inside the try block to skip just the optimization logic, or 
restructure to ensure the fallback mechanism still works.
   ```suggestion
       try {
         if (!singleChildFallbackEnabled) {
           return convertExprWithFallback(sparkExpr, isPruningExpr = false, 
fallbackToError)
         }
   ```



-- 
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]

Reply via email to