andygrove opened a new pull request, #3885:
URL: https://github.com/apache/datafusion-comet/pull/3885

   ## Which issue does this PR close?
   
   N/A (minor bug fix discovered during plan inspection)
   
   ## Rationale for this change
   
   When a `GenerateExec` (Spark's `Generate` operator) falls back to Spark and 
the child operator is not native, the explain info shows `Generate [COMET: ]` 
with an empty fallback reason. This makes it difficult to understand why the 
operator was not converted.
   
   The root cause is in `CometExplodeExec.convert`: when `childOp` is empty 
(child operator not native), the code calls `withInfo(op, op.output: _*)` which 
tries to propagate explain info tags from output `Attribute` nodes. Since 
output attributes never have `EXTENSION_INFO` tags, the `Generate` node ends up 
with an empty tag set that still renders in the verbose explain output.
   
   Similarly, `CometArrayFilter.getSupportLevel` returns `Unsupported()` with 
no reason for unsupported filter functions.
   
   ## What changes are included in this PR?
   
   1. **`CometExplodeExec.convert`**: Split the combined `childOp.isEmpty || 
projectExprs.exists(_.isEmpty)` check into two separate checks. The 
`childOp.isEmpty` case now provides an explicit message: "Generate is not 
native because the child operator is not native".
   
   2. **`CometArrayFilter.getSupportLevel`**: Added a reason to the 
`Unsupported` return: "Only array_compact (ArrayFilter with IsNotNull) is 
supported".
   
   ## How are these changes tested?
   
   These are minor changes to fallback reason strings. The existing test suite 
covers the operator conversion logic. The change was verified by compiling 
successfully.


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