Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORC: Enable predicate pushdown and remove metrics workaround for Timestamps #1696

Merged
merged 1 commit into from
Nov 1, 2020

Conversation

shardulm94
Copy link
Contributor

Now that ORC-611 is fixed, ORC will store statistics for Timestamp types with nanosecond precision. So we can push down predicates and also rely on timestamp statistics reported back by ORC.

For older ORC files which only contain millisecond precision stats, ORC will subtract/add 1 millisecond to the min/max so that the lower/upper bounds are valid and correctly represent the values in the data.

// { "orc", "timestamp", "2018-06-29T10:02:34.000000", "2018-06-29T15:02:34.000000" },
// { "orc", "timestamptz", "2018-06-29T10:02:34.000000+00:00", "2018-06-29T10:02:34.000000-07:00" },
{ "orc", "timestamp", "2018-06-29T10:02:34.000000", "2018-06-29T15:02:34.000000" },
{ "orc", "timestamptz", "2018-06-29T10:02:34.000000+00:00", "2018-06-29T10:02:34.000000-07:00" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we be using values that have microseconds?

@rdblue
Copy link
Contributor

rdblue commented Nov 1, 2020

The changes look good to me. I would like to have tests that exercise microsecond precision, but the commented out cases already used rounded values so I don't think it is a blocker for this fix. Thanks @shardulm94!

@rdblue rdblue merged commit 29915e3 into apache:master Nov 1, 2020
@rdblue rdblue added this to the Java 0.10.0 Release milestone Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants