OIiveirra commented on code in PR #68024:
URL: https://github.com/apache/doris/pull/68024#discussion_r4045022542
##########
be/src/format_v2/orc/orc_search_argument.cpp:
##########
@@ -1248,17 +1248,17 @@ ::orc::Literal ceil_timestamp_literal_to_millis(const
::orc::Literal& literal) {
return shift_timestamp_literal(literal, NANOS_PER_MILLISECOND - remainder);
}
-std::pair<::orc::Literal, ::orc::Literal> timestamp_rounding_bounds(const
::orc::Literal& literal) {
- constexpr int32_t HALF_MICROSECOND_NANOS = 500;
- // All raw ORC values in [lower, upper) round half-up to this Doris
microsecond. Round these
+std::pair<::orc::Literal, ::orc::Literal> timestamp_truncation_bounds(
+ const ::orc::Literal& literal) {
+ constexpr int32_t NANOS_PER_MICROSECOND = 1000;
+ // All raw ORC values in [lower, upper) truncate to this Doris
microsecond. Expand these
// boundaries toward the side that enlarges the SARG match set because ORC
statistics retain
// only millisecond precision.
- return {shift_timestamp_literal(literal, -HALF_MICROSECOND_NANOS),
- shift_timestamp_literal(literal, HALF_MICROSECOND_NANOS)};
+ return {literal, shift_timestamp_literal(literal, NANOS_PER_MICROSECOND)};
Review Comment:
Resolved in `8b1f7a577e2`. The obsolete exact-epoch exclusions were removed
while retaining the negative-seconds fallback. Added an epoch predicate test
that verifies a negative-only stripe is pruned; all 29 targeted timestamp BE
tests pass.
--
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]