voonhous commented on code in PR #20524:
URL: https://github.com/apache/hudi/pull/20524#discussion_r4475509889
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestHoodieCatalystExpressionUtils.scala:
##########
@@ -41,8 +42,14 @@ class TestHoodieCatalystExpressionUtils extends
SparkAdapterSupport {
private val boolAttr = AttributeReference("b", BooleanType)()
private val binAttr = AttributeReference("bin", BinaryType)()
- private def matched(expr: Expression): Option[AttributeReference] =
-
sparkAdapter.getCatalystExpressionUtils.tryMatchAttributeOrderingPreservingTransformation(expr)
+ /**
+ * Walks the rule table down to a bare column: the attribute itself, else
the first rule step
+ * whose child resolves to one. Like the stage-3 range walk, it does not
check reference count.
+ */
+ private def matched(expr: Expression): Option[AttributeReference] = expr
match {
Review Comment:
Done, `matched` now calls `TermRange#derive` with a `ColumnStatsSource` that
indexes one column at a time, so it runs the production flow.
`RangeSource` is also sealed, so the one-column `ColumnStatsSource` takes
the place of a stub.
`RangeRules.of` had no other caller and hence, is removed.
--
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]