-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Deprecate passing constraints to getTableStatistics #11877
Deprecate passing constraints to getTableStatistics #11877
Conversation
@@ -63,10 +61,7 @@ public TableScanStatsRule(Metadata metadata, StatsNormalizer normalizer) | |||
return node.getStatistics(); | |||
} | |||
|
|||
// TODO Construct predicate like AddExchanges's LayoutConstraintEvaluator |
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.
My bad, i forgot about this. applyFilter
won't make this obsolete, and this is a good idea.
however, the current state is bad: we pass a Constraint and it's useless. So i think it's better to proceed with this PR, and reintroduce Constraint later, if actually going to be used.
core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/DefaultJdbcMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java
Outdated
Show resolved
Hide resolved
1f01381
to
bc68076
Compare
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.
"fixup" lgtm
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TableStatisticsMaker.java
Show resolved
Hide resolved
70ddea7
to
9fcefbf
Compare
squashed myself |
Retriggered CI because #11722 has been merged. |
Description
Deprecate passing constraints to
ConnectorMetadata.getTableStatistics()
, because it always receivedConstraints.alwaysTrue()
. Connectors should handle constraints inapplyFilter()
, which prepare the table handle that later will be passed togetTableStatistics()
.other, mostly refactor but it makes SPI changes
spi
n/a
Related issues, pull requests, and links
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) Release notes entries required with the following suggested text: