-
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
Support lazy dynamic filtering in hive connector #4991
Conversation
345f0f0
to
f673884
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.
looks good
presto-hive/src/main/java/io/prestosql/plugin/hive/BackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/BackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/BackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/HiveQueryRunner.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/HiveQueryRunner.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/HiveQueryRunner.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveDynamicPartitionPruning.java
Show resolved
Hide resolved
f9e631f
to
9f21a18
Compare
9f21a18
to
671e84a
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 :)
presto-hive/src/main/java/io/prestosql/plugin/hive/BackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/BackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/BackgroundHiveSplitLoader.java
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/HiveQueryRunner.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/HiveQueryRunner.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveDistributedJoinQueries.java
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveDynamicPartitionPruning.java
Show resolved
Hide resolved
671e84a
to
60b51c6
Compare
cfbd57d
to
80f43f9
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
presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveDistributedJoinQueries.java
Show resolved
Hide resolved
presto-main/src/main/java/io/prestosql/server/DynamicFilterService.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/io/prestosql/server/DynamicFilterService.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/BackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/TestBackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/TestBackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveDynamicPartitionPruning.java
Outdated
Show resolved
Hide resolved
|
||
OperatorStats probeStats = searchScanFilterAndProjectOperatorStats(result.getQueryId(), "tpch:" + PARTITIONED_LINEITEM); | ||
// Probe-side is partially scanned | ||
assertLessThan(probeStats.getInputPositions(), countRows("lineitem")); |
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.
question: is it a consistent same scanned row count every time?
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.
Yes, we use text storage format and partitioned joins so the only pruning here should come from DF and it should be consistent due to the probe blocking logic. I've updated it to assert for specific row count now.
presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveDynamicPartitionPruning.java
Outdated
Show resolved
Hide resolved
80f43f9
to
04c547c
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 + please add test case for large build side % minor comments
presto-hive/src/main/java/io/prestosql/plugin/hive/BackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/TestBackgroundHiveSplitLoader.java
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveDynamicPartitionPruning.java
Outdated
Show resolved
Hide resolved
presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveDynamicPartitionPruning.java
Outdated
Show resolved
Hide resolved
04c547c
to
b8b0ad3
Compare
assertEquals(dynamicFiltersStats.getTotalDynamicFilters(), 2L); | ||
assertEquals(dynamicFiltersStats.getLazyDynamicFilters(), 2L); | ||
assertEquals(dynamicFiltersStats.getReplicatedDynamicFilters(), 0L); | ||
assertBetweenInclusive(dynamicFiltersStats.getDynamicFiltersCompleted(), 1, 2); |
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 FYI I tweaked this test a bit to assert on completion of only one filter. I was seeing some flakiness without this because the probe side gets unblocked after receiving one filter and the query can sometimes finish before DynamicFilterService is able to collect the 2nd filter. If I set experimental.dynamic-filtering-refresh-interval
to a very low value like 20ms
then the flakiness goes away.
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.
After changing to wait on full DF, the above tweak is no longer needed
presto-hive/src/main/java/io/prestosql/plugin/hive/BackgroundHiveSplitLoader.java
Outdated
Show resolved
Hide resolved
b8b0ad3
to
b001728
Compare
merged, thanks! |
No description provided.