-
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
Push PARTIAL TopN into table scan #7563
Conversation
69fdab7
to
af7373a
Compare
core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNIntoTableScan.java
Outdated
Show resolved
Hide resolved
private static final Pattern<TopNNode> PATTERN = topN() | ||
.matching(node -> node.getStep().equals(Step.SINGLE)) | ||
.matching(node -> EnumSet.of(Step.SINGLE, Step.PARTIAL).contains(node.getStep())) |
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.
Add a comment at
trino/core/trino-main/src/main/java/io/trino/sql/planner/iterative/rule/PushTopNIntoTableScan.java
Lines 83 to 85 in b2f1f69
return metadata.applyTopN(context.getSession(), tableScan.getTable(), topNCount, sortItems, assignments) | |
.map(result -> { | |
PlanNode node = TableScanNode.newInstance( |
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.
Added sth
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java
Outdated
Show resolved
Hide resolved
af7373a
to
c5e6712
Compare
AC |
CI: #7559 |
fixes #7028