-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Allow ValueSet expansion into a discrete set for Bloom filtering #9868
Conversation
e576072
to
937bdf5
Compare
plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcReaderConfig.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveSessionProperties.java
Outdated
Show resolved
Hide resolved
Wonder whether user(s) of |
937bdf5
to
d425c2c
Compare
IIUC, it has a single usage here: trino/plugin/trino-hive/src/main/java/io/trino/plugin/hive/util/HiveBucketing.java Line 230 in 8f5aa1c
I think it should be OK to try range expansion here as well, but we need to apply a reasonable limit - maybe reuse/rename |
lib/trino-orc/src/main/java/io/trino/orc/TupleDomainOrcPredicate.java
Outdated
Show resolved
Hide resolved
In the current code, we use |
IIUC, it may help if we use an inequality predicate (e.g. trino/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadata.java Lines 2501 to 2517 in 1b5db4a
|
core/trino-spi/src/test/java/io/trino/spi/predicate/TestValueSet.java
Outdated
Show resolved
Hide resolved
lib/trino-orc/src/main/java/io/trino/orc/TupleDomainOrcPredicate.java
Outdated
Show resolved
Hide resolved
c9fd6b7
to
27a756c
Compare
Many thanks for the review! |
I changed |
Can we remove the new config altogether and just derive the limit from existing compaction threshold config ? |
27a756c
to
1edc70f
Compare
Sounds good - this indeed simplifies 1edc70f significantly :) |
lib/trino-orc/src/main/java/io/trino/orc/TupleDomainOrcPredicate.java
Outdated
Show resolved
Hide resolved
b69aeb1
to
311a105
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % comments
lib/trino-orc/src/main/java/io/trino/orc/TupleDomainOrcPredicate.java
Outdated
Show resolved
Hide resolved
7e204a1
to
94a1a1d
Compare
94a1a1d
to
70c220b
Compare
Thanks for the review and the approval! |
ouch, rebase. this gives me https://github.com/trinodb/trino/compare/7e204a1545ea3b739148cd2036fb6a428c2f4c69..94a1a1d247c188dd6deea2ac61bbc31575908f73 as the diff. Has anything changed there? |
Also, implement it for basic integral types. Following trinodb#9868 (comment)
70c220b
to
cafcdda
Compare
Oops.... un-rebased, so the following diff can be reviewed more easily: |
* For example: [1, 5] can be expanded into {1, 2, 3, 4, 5}. | ||
* If the data type is not supported or the expansion results in too many values, {@code Optional.empty()} is returned. | ||
*/ | ||
static Optional<Collection<Object>> tryExpandRanges(ValueSet valuesSet, int valuesLimit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove static
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure - if I remove it, the build will fail (IIUC):
[ERROR] .../ValueSet.java:[176,5] interface abstract methods cannot have body
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The operation takes ValueSet and is defined in ValueSet. Why not instance/interface method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right - my bad... 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a (hopefully) better version in 7a8425f088.
thanks! |
cafcdda
to
7a8425f
Compare
@rzeyde-varada thanks for the update. Please see CI red. |
7a8425f
to
112fb76
Compare
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sopel39 PTAL
112fb76
to
db12517
Compare
Simplified the code, following #9868 (comment). |
db12517
to
f96ea0f
Compare
Also, implement it for basic integral types. Following #9868 (comment)
Thanks! |
Fixes #4108.