You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/04/02 19:59:31 UTC

[PR] fix: provide fallback reasons for Generate and ArrayFilter operators [datafusion-comet]

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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: make Unsupported require a reason string [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #3885:
URL: https://github.com/apache/datafusion-comet/pull/3885#discussion_r3030182187


##########
spark/src/main/scala/org/apache/comet/serde/arrays.scala:
##########
@@ -622,7 +622,8 @@ object CometArrayFilter extends CometExpressionSerde[ArrayFilter] {
   override def getSupportLevel(expr: ArrayFilter): SupportLevel = {
     expr.function.children.headOption match {
       case Some(_: IsNotNull) => Compatible()
-      case _ => Unsupported()
+      case _ =>
+        Unsupported("Only array_compact (ArrayFilter with IsNotNull) is supported")

Review Comment:
   This was previously not reported



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: make Unsupported require a reason string [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove closed pull request #3885: fix: make Unsupported require a reason string
URL: https://github.com/apache/datafusion-comet/pull/3885


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org