wombatu-kun commented on code in PR #20526:
URL: https://github.com/apache/hudi/pull/20526#discussion_r4479994854
##########
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:
Will do once #19474 lands: I'll rebase onto it, move the check into
`fileGuard`s on the rendering arms as sketched, and drop the extra stage. That
change will also correct the NOTE on `(TimestampType | TimestampNTZType,
DateType)` in `CastRule`: across a midnight fall-back the local date does run
backwards (America/St_Johns on 2009-11-01).
--
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]