Skip to content

Reuse TypeOperators instance from TypeManager in IcebergMetadataFactory #14512

Merged
ebyhr merged 1 commit intotrinodb:masterfrom
ebyhr:ebi/iceberg-type-operators
Oct 7, 2022
Merged

Reuse TypeOperators instance from TypeManager in IcebergMetadataFactory #14512
ebyhr merged 1 commit intotrinodb:masterfrom
ebyhr:ebi/iceberg-type-operators

Conversation

@ebyhr
Copy link
Copy Markdown
Member

@ebyhr ebyhr commented Oct 7, 2022

Description

Reuse TypeOperators instance from TypeManager in IcebergMetadataFactory

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

Thus, the connector reuses the same instance between
IcebergMetadataFactory and IcebergNodePartitioningProvider.
@cla-bot cla-bot bot added the cla-signed label Oct 7, 2022
unsupported.put(columnHandle, domain);
}
else if (canEnforceColumnConstraintInSpecs(typeOperators, icebergTable, partitionSpecIds, columnHandle, domain)) {
else if (canEnforceColumnConstraintInSpecs(typeManager.getTypeOperators(), icebergTable, partitionSpecIds, columnHandle, domain)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not inject the TypeOperators instance in both classes through Guice instead of depending on the getter of typeManager ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It would require additional bindings. Let me merge as-is.

Copy link
Copy Markdown
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.

Thank you

@ebyhr
Copy link
Copy Markdown
Member Author

ebyhr commented Oct 7, 2022

{compatibility.testDockerImage=trinodb/trino:399} failure relates to
https://trinodb.slack.com/archives/CFP480UKX/p1665108934638869

@ebyhr ebyhr merged commit 2ea06f3 into trinodb:master Oct 7, 2022
@ebyhr ebyhr deleted the ebi/iceberg-type-operators branch October 7, 2022 09:19
@github-actions github-actions bot added this to the 400 milestone Oct 7, 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.

4 participants