andygrove commented on code in PR #4509:
URL: https://github.com/apache/datafusion-comet/pull/4509#discussion_r3422666271
##########
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:
I see now that you are suggesting adding tag as an argument, presumably we
could default it to fallback and then be explicit in other cases... I will take
a look
--
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]