andygrove commented on code in PR #4509:
URL: https://github.com/apache/datafusion-comet/pull/4509#discussion_r3422662438
##########
spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala:
##########
@@ -361,4 +361,22 @@ object CometSparkSessionExtensions extends Logging {
node.getTagValue(CometExplainInfo.FALLBACK_REASONS).exists(_.nonEmpty)
}
+ /**
+ * Record a purely informational message on a `TreeNode`. Unlike
`withFallbackReason`, this does
+ * NOT cause the node to fall back to Spark: the rules never read this tag.
Messages are
+ * accumulated (never overwritten) on the node's `EXTENSION_INFO` tag and
surfaced in verbose
+ * extended explain output under a `[COMET-INFO: ...]` label.
+ *
+ * Use this to point the user at a faster or alternative execution path that
is available but
+ * not currently selected, for example a native implementation gated behind
a config.
+ */
+ def withInfo[T <: TreeNode[_]](node: T, message: String): T = {
Review Comment:
How would we distinguish between messages that should trigger fallback
versus purely informational messages? Are you thinking that would be an extra
parameter to `withInfo`?
--
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]