Skip to content

[WIP] Always consume guaranteed limit on pushDown#9056

Closed
losipiuk wants to merge 1 commit intotrinodb:masterfrom
losipiuk:lo/apply-limit-always-consume-garanteed
Closed

[WIP] Always consume guaranteed limit on pushDown#9056
losipiuk wants to merge 1 commit intotrinodb:masterfrom
losipiuk:lo/apply-limit-always-consume-garanteed

Conversation

@losipiuk
Copy link
Copy Markdown
Member

No description provided.

@losipiuk losipiuk changed the title Always consume guaranteed limit on pushDown [WIP] Always consume guaranteed limit on pushDown Aug 31, 2021
@findepi findepi self-requested a review August 31, 2021 13:41
if (!limitGuaranteed) {
return Optional.empty();
}
return Optional.of(new LimitApplicationResult<>(handle, limitGuaranteed, false));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

connector should return non-empty only when plan changes.
per io.trino.spi.connector.ConnectorMetadata#applyLimit doc:

     * Connectors can indicate whether they don't support limit pushdown or that the action had no effect
     * by returning {@link Optional#empty()}. 

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think instead, we would need "redundant limit pruning rule"
i.e. a connector needs to be able to tell the engine what's the max cardinality to be returned
(just like it can return enforced predicates)

@mosabua
Copy link
Copy Markdown
Member

mosabua commented Oct 28, 2022

👋 @losipiuk - this PR has become inactive.

We're working on closing out old and inactive PRs, so if you're too busy or this has too many merge conflicts to be worth picking back up, we'll be making another pass to close it out in a few weeks.

@colebow
Copy link
Copy Markdown
Member

colebow commented Nov 30, 2022

Closing this one out due to inactivity, but please reopen if you would like to pick this back up.

@colebow colebow closed this Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants