anshulsingh-py commented on code in PR #19853:
URL: https://github.com/apache/hudi/pull/19853#discussion_r4009911609
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/HoodieProcedureFilterUtils.scala:
##########
@@ -357,10 +366,31 @@ object HoodieProcedureFilterUtils {
}
case _ => unresolvedFunc
}
+ resolveOrFallback(hardcodedResolved, unresolvedFunc, sparkSession)
}
- // Third pass: handle type coercion for numeric comparisons
- functionResolved.transformUp {
+ // Third pass: unwrap any RuntimeReplaceable the parser emitted directly
(ILIKE parses straight
+ // to ILike, never through an UnresolvedFunction the second pass would
route through the
+ // registry) to its real, evaluable replacement, then handle type coercion
for numeric
+ // comparisons.
+ applyHudiWideningRules(unwrapRuntimeReplaceable(functionResolved))
Review Comment:
Good catch - that duplication was mine from the previous round. Renamed the
helper to unwrapAndWiden and called it from both sites. Also swept the file for
the same shape and extracted the two other instances:
DecimalPrecision.transform.applyOrElse(x, identity) appeared four times (now
applyDecimalPrecisionRule), and the
widenOperands(...).map(withNewChildren).getOrElse(binary) composition appeared
twice (now widenChildrenOf).
--
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]