Skip to content

Push whole join condition into connectors#13943

Merged
findepi merged 3 commits into
trinodb:masterfrom
findepi:findepi/expressive-join-pushdown
Sep 12, 2022
Merged

Push whole join condition into connectors#13943
findepi merged 3 commits into
trinodb:masterfrom
findepi:findepi/expressive-join-pushdown

Conversation

@findepi
Copy link
Copy Markdown
Member

@findepi findepi commented Aug 31, 2022

Previously join pushdown was limited to simple comparison conditions
between variables. That's because the applyJoin was added before we
had real connector expressions. The commit exposes to connectors all
join condition's conjuncts that are translatable to
ConnectorExpression.

@cla-bot cla-bot Bot added the cla-signed label Aug 31, 2022
@findepi
Copy link
Copy Markdown
Member Author

findepi commented Aug 31, 2022

cc @losipiuk @hashhar @wendigo @assaf2 @kokosing

@assaf2 assaf2 self-requested a review September 1, 2022 06:36
@hashhar hashhar self-requested a review September 1, 2022 07:27
Comment thread core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java Outdated
Comment thread core/trino-spi/src/main/java/io/trino/spi/connector/JoinCondition.java Outdated
Comment thread core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java Outdated
@findepi findepi force-pushed the findepi/expressive-join-pushdown branch from a858fb2 to a845f2b Compare September 5, 2022 12:56
- The expression and its symbol types should be passed next to each other.
- TypeAnalyzer is usually provided after PlannerContext (until it's made
  part of it)
@findepi findepi force-pushed the findepi/expressive-join-pushdown branch from a845f2b to 43d1ff5 Compare September 5, 2022 13:06
Move translation of individual conjuncts from `PushPredicateIntoTableScan`
into `ConnectorExpressionTranslator` to make it reusable.

This also changes `ConnectorExpressionTranslation` into a record, which
is very suitable for a composite method return type.
@findepi findepi force-pushed the findepi/expressive-join-pushdown branch 2 times, most recently from 6282708 to aac7399 Compare September 5, 2022 13:35
Comment thread core/trino-spi/src/main/java/io/trino/spi/connector/JoinCondition.java Outdated
Comment thread core/trino-spi/src/main/java/io/trino/spi/connector/JoinCondition.java Outdated
Previously join pushdown was limited to simple comparison conditions
between variables. That's because the `applyJoin` was added before we
had real connector expressions. The commit exposes to connectors all
join condition's conjuncts that are translatable to
`ConnectorExpression`.
@findepi findepi force-pushed the findepi/expressive-join-pushdown branch from aac7399 to 1a984bb Compare September 7, 2022 12:22
@findepi findepi requested a review from assaf2 September 7, 2022 12:22
@findepi
Copy link
Copy Markdown
Member Author

findepi commented Sep 7, 2022

AC

@assaf2 @hashhar PTAL

@findepi findepi self-assigned this Sep 7, 2022
@findepi findepi merged commit e879522 into trinodb:master Sep 12, 2022
@findepi findepi deleted the findepi/expressive-join-pushdown branch September 12, 2022 07:33
@github-actions github-actions Bot added this to the 396 milestone Sep 12, 2022
@colebow
Copy link
Copy Markdown
Member

colebow commented Sep 13, 2022

Are docs / release notes needed for this? @findepi

@findepi findepi added no-release-notes This pull request does not require release notes entry and removed no-release-notes This pull request does not require release notes entry labels Sep 13, 2022
@findepi findepi mentioned this pull request Sep 13, 2022
@findepi
Copy link
Copy Markdown
Member Author

findepi commented Sep 13, 2022

Thanks @colebow , see #14047 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants