Skip to content

Conversation

@zhangbutao
Copy link
Contributor

@zhangbutao zhangbutao commented Dec 29, 2025

What changes were proposed in this pull request?

The purpose of this PR is to implement table-related DDL statements such as create/show/drop/alter to correctly recognize the semantics of cat.db.tbl, thereby implementing DDL operations on tables in non-default catalogs.

There are many table DDL interfaces that need to be refactored. This PR is temporarily marked as a draft, but if anyone is interested, suggestions are always welcome.

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

@zhangbutao zhangbutao marked this pull request as draft December 29, 2025 09:36
}
-> ^(TOK_TABNAME $cat $db $tab $meta?)

// case 2:db.table
Copy link
Contributor

@Aggarwal-Raghav Aggarwal-Raghav Dec 29, 2025

Choose a reason for hiding this comment

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

@zhangbutao , For iceberg meta tables like snapshots, files etc. the select * from db.tbl.meta should work which is the existing behaviour. Meaning, case 2 should have meta? IMO. Won't it misinterpret this example select with the case 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. There will be a breaking change here. We cannot distinguish between the semantic expressions cat.db.tbl and db.tbl.meta, so for Iceberg's meta tables, I will switch to using the format cat.db.tbl.meta, or reference Trino's approach as shown at https://trino.io/docs/current/connector/iceberg.html#metadata-tables, for example: SELECT * FROM "test_table$properties". In any case, this will cause backward compatibility issues.

Regarding this breaking change, I will initiate a discussion in the dev community mailing list to see if anyone has better suggestions.

@sonarqubecloud
Copy link

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants