Skip to content

Rely only on table handle for stopping condition#20041

Merged
findepi merged 3 commits intotrinodb:masterfrom
assaf2:assaf2-os/fix-condition
Dec 8, 2023
Merged

Rely only on table handle for stopping condition#20041
findepi merged 3 commits intotrinodb:masterfrom
assaf2:assaf2-os/fix-condition

Conversation

@assaf2
Copy link
Copy Markdown
Member

@assaf2 assaf2 commented Dec 6, 2023

In order to avoid a potential infinite loop at IterativeOptimizer with Iceberg

Description

Rely on the data in the table handle instead of Constraint for stopping condition.
According to my check, we don't see an infinite loop only because io.trino.sql.planner.iterative.rule.PushPredicateIntoTableScan#arePlansSame returns true and stops the iterative process. If in the future io.trino.plugin.iceberg.IcebergTableHandle#equals will return false when comparing 2 tables of 2 different iterations, then we'll see an infinite loop. That's while io.trino.spi.connector.ConnectorTableHandle is an empty interface that doesn't declare equals().

Additional context and related issues

This is another case in continue to #20007 and #19876.

Release notes

( X ) This is not user-visible or is 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:

In order to avoid a potential infinite loop
at IterativeOptimizer with Iceberg
@cla-bot cla-bot bot added the cla-signed label Dec 6, 2023
@github-actions github-actions bot added the iceberg Iceberg connector label Dec 6, 2023
@findepi findepi merged commit e9fbe6d into trinodb:master Dec 8, 2023
@github-actions github-actions bot added this to the 435 milestone Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed iceberg Iceberg connector

Development

Successfully merging this pull request may close these issues.

3 participants