plusplusjiajia commented on code in PR #10896:
URL: https://github.com/apache/paimon/pull/10896#discussion_r4430856226
##########
paimon-python/pypaimon/catalog/jdbc_catalog.py:
##########
@@ -404,20 +404,38 @@ def list_tables(self, database_name: str) -> List[str]:
def get_table(self, identifier: Union[str, Identifier]) -> Table:
if not isinstance(identifier, Identifier):
identifier = Identifier.from_string(identifier)
+ branch = encoded_branch_name(identifier)
+ if branch is not None and branch != DEFAULT_MAIN_BRANCH:
+ raise NotImplementedError("JdbcCatalog currently does not support
table branches")
if self.catalog_options.contains(CoreOptions.SCAN_FALLBACK_BRANCH):
raise ValueError(f"Unsupported CoreOption
{CoreOptions.SCAN_FALLBACK_BRANCH}")
if not self._table_exists(identifier):
raise TableNotExistException(identifier)
table_path = self.get_table_path(identifier)
table_schema = self.get_table_schema(identifier)
+ table_identifier = identifier
Review Comment:
@Akash3121 Thanks, confirmed: the returned table kept the `MAIN` branch and
read nothing. Fixed in 9cc196d9d8: `get_table` now builds the table identifier
without the system table or the default main branch spelling for every accepted
input, and `test_get_table_branch` writes a row and reads it back through each
main identifier, checking `current_branch()` is `main`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]