wombatu-kun commented on code in PR #20526:
URL: https://github.com/apache/hudi/pull/20526#discussion_r4483324912
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/dataskipping/StatsFilterCompiler.scala:
##########
@@ -64,10 +64,12 @@ object StatsFilterCompiler {
case leaf => compileLeaf(leaf, source)
}
- // Stages 2 to 4, for one leaf
+ // Stages 2 to 4, for one leaf. A verdict over a date rendering also keeps
the files spanning a local date
+ // reversal ([[LocalDateReversalGuard]])
private def compileLeaf(e: Expression, source: RangeSource): Expression =
Leaf.parse(e)
.flatMap(l => TermRange.derive(l.term, source).map(r => Verdict(l, r)))
+ .flatMap(LocalDateReversalGuard(e, source, _))
Review Comment:
Done 3ccf38cb3bb6. Two changes beyond the sketch: the `CastRule` allowlist
no longer lists `(TimestampType, DateType)`, so that cast is ranged only
through the guarded arm, and the guard reads both bounds through `TryEval`,
because a one-sided verdict reads only one of them and, for ex,
`from_utc_timestamp` of the largest timestamp overflows.
--
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]