-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Push DistinctLimit into TableScan #5756
Push DistinctLimit into TableScan #5756
Conversation
...in/src/main/java/io/prestosql/sql/planner/iterative/rule/PushDistinctLimitIntoTableScan.java
Show resolved
Hide resolved
...in/src/main/java/io/prestosql/sql/planner/iterative/rule/PushDistinctLimitIntoTableScan.java
Outdated
Show resolved
Hide resolved
...in/src/main/java/io/prestosql/sql/planner/iterative/rule/PushDistinctLimitIntoTableScan.java
Show resolved
Hide resolved
...in/src/main/java/io/prestosql/sql/planner/iterative/rule/PushDistinctLimitIntoTableScan.java
Show resolved
Hide resolved
This way the test method is self-contained.
Previously the stats collection would be bound to the session outside of transaction, leading to "Not in a transaction" exceptions being logged. (The stats collection failures are suppressed by default.)
67db2e3
to
889f2c1
Compare
...main/src/main/java/io/prestosql/sql/planner/iterative/rule/PushAggregationIntoTableScan.java
Outdated
Show resolved
Hide resolved
...main/src/main/java/io/prestosql/sql/planner/iterative/rule/PushAggregationIntoTableScan.java
Show resolved
Hide resolved
...in/src/main/java/io/prestosql/sql/planner/iterative/rule/PushDistinctLimitIntoTableScan.java
Show resolved
Hide resolved
...rc/test/java/io/prestosql/sql/planner/iterative/rule/TestPushDistinctLimitIntoTableScan.java
Show resolved
Hide resolved
...rc/test/java/io/prestosql/sql/planner/iterative/rule/TestPushDistinctLimitIntoTableScan.java
Outdated
Show resolved
Hide resolved
.withApplyAggregation( | ||
(session, handle, aggregates, assignments, groupingSets) -> { | ||
ApplyAggregation applyAggregation = testApplyAggregation.get(); | ||
if (applyAggregation != null) { |
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.
require non null applyAggregation? To make sure it is always set in test.
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 test code ensures -- and must ensure that -- thru the way how assertions are written.
889f2c1
to
636948e
Compare
...rc/test/java/io/prestosql/sql/planner/iterative/rule/TestPushDistinctLimitIntoTableScan.java
Show resolved
Hide resolved
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
636948e
to
d20cdc9
Compare
AC |
Fixes #5522