[flink] Fix TableNotExistException when listing partitions on changelog / binlog virtual tables#3641
Open
naivedogger wants to merge 2 commits into
Open
Conversation
added 2 commits
July 13, 2026 16:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #3640
When the Flink optimizer calls
listPartitions()on a$changelogor$binlogvirtual table, it throwsTableNotExistExceptionbecause the virtual table suffix is not stripped before querying the Fluss server.getTable()correctly dispatches virtual table names togetVirtualChangelogTable()/getVirtualBinlogTable(), buttableExists(),listPartitions(),createPartition(), anddropPartition()all pass the unstripped virtual table name directly to the admin API, which fails because no physical table namedxxx$changelogexists.Brief change log
toPhysicalTablePath()private helper method toFlinkCatalogthat strips$changelog,$binlog, and$lakesuffixes from the table name, returning the base physical table pathtableExists()to usetoPhysicalTablePath()— virtual tables now correctly report existence based on the base tablelistPartitions(ObjectPath, CatalogPartitionSpec)to usetoPhysicalTablePath()— virtual tables now list partitions of the base tablecreatePartition()anddropPartition()to usetoPhysicalTablePath()— partition management through virtual table names delegates to the base tableTests
FlinkCatalogTest#testVirtualTablePartitionsAndExistencewhich verifies:tableExists()returnstruefor$changelogand$binlogvirtual table nameslistPartitions()returns the same partitions as the base table for both virtual table suffixeslistPartitions()with aCatalogPartitionSpecworks correctly on virtual table namescreatePartition()anddropPartition()work through virtual table namesFlinkCatalogTest#testOperatePartitionscontinues to pass (no regression)API and Format
No API or storage format changes. The fix only affects internal catalog method behavior for virtual table names.
Documentation
No documentation changes needed — this is a bug fix that makes virtual table behavior consistent with
getTable().