Skip to content
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

Refactor table function analysis #12407

Merged
merged 2 commits into from
May 16, 2022
Merged

Conversation

kasiafi
Copy link
Member

@kasiafi kasiafi commented May 16, 2022

This is a refactor around table function Analysis.

This is a SPI change. No release notes needed if this change is merged before the upcoming release (the main change has not been yet released)

This change has to be taken into account in the documentation (#12338)

@cla-bot cla-bot bot added the cla-signed label May 16, 2022
@@ -1488,7 +1488,7 @@ protected Scope visitTableFunctionInvocation(TableFunctionInvocation node, Optio
ConnectorTransactionHandle transactionHandle = transactionManager.getConnectorTransaction(
session.getRequiredTransactionId(),
getRequiredCatalogHandle(metadata, session, node, catalogName.getCatalogName()));
ConnectorTableFunction.Analysis functionAnalysis = function.analyze(session.toConnectorSession(catalogName), transactionHandle, passedArguments);
io.trino.spi.ptf.Analysis functionAnalysis = function.analyze(session.toConnectorSession(catalogName), transactionHandle, passedArguments);
Copy link
Member

Choose a reason for hiding this comment

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

rename Analysis so it can be imported here

* gathered at analysis time. Typically, these are the values of the constant arguments, and results
* of pre-processing arguments.
*/
public class Analysis
Copy link
Member

Choose a reason for hiding this comment

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

final (this is SPI, so let's be defensive)

Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

%

kasiafi added 2 commits May 16, 2022 15:41
The `analyze()` method of a `ConnectorTableFunction` must be implemented
by every subclass. It is now marked as abstract.
@kasiafi kasiafi force-pushed the 349PTFAnalysisRefactor branch from c2ef5be to 131dc44 Compare May 16, 2022 13:45
@kasiafi kasiafi merged commit 8e9eef5 into trinodb:master May 16, 2022
@github-actions github-actions bot added this to the 381 milestone May 16, 2022
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.

2 participants