parthchandra commented on code in PR #4509:
URL: https://github.com/apache/datafusion-comet/pull/4509#discussion_r3406719598
##########
spark/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q24a/extended.txt:
##########
@@ -9,7 +9,7 @@ CometNativeColumnarToRow
: +- CometExchange
: +- CometHashAggregate
: +- CometProject
- : +- CometBroadcastHashJoin
+ : +- CometBroadcastHashJoin [COMET-INFO: A
native implementation of Upper is available but needs to be enabled with
spark.comet.caseConversion.enabled. See compatibility guide for more
information.]
Review Comment:
We should probably decouple informational messages (which may change) from
the plan stability test which should really only check that there is no
degradation in the generated plan.
##########
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 feel it would be a simpler design to merely have a single `withInfo(node,
tag, message)` instead of adding a new set of methods for every new tag type.
wdyt?
--
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]