SteNicholas commented on code in PR #447:
URL: https://github.com/apache/paimon-cpp/pull/447#discussion_r4388774633


##########
src/paimon/core/catalog/file_system_catalog.cpp:
##########
@@ -337,13 +318,8 @@ Result<std::shared_ptr<Schema>> 
FileSystemCatalog::LoadTableSchema(
 Result<std::shared_ptr<Table>> FileSystemCatalog::GetTable(const Identifier& 
identifier) const {
     PAIMON_ASSIGN_OR_RAISE(bool is_system_table, identifier.IsSystemTable());
     if (is_system_table) {
-        PAIMON_ASSIGN_OR_RAISE(std::shared_ptr<Schema> schema, 
LoadTableSchema(identifier));
-        // A system table reads the files of the data table it belongs to, so 
its root path
-        // is that table's.
-        PAIMON_ASSIGN_OR_RAISE(std::string data_table_name, 
identifier.GetDataTableName());
-        Identifier data_identifier(identifier.GetDatabaseName(), 
data_table_name);
-        PAIMON_ASSIGN_OR_RAISE(std::string table_path, 
GetTableLocation(data_identifier));
-        return std::make_shared<Table>(fs_, table_path, schema, identifier);
+        // A system table reads the data table's files through this catalog's 
file system.
+        return LoadSystemTable(identifier);

Review Comment:
   [P2] Preserve access to filesystem global system tables
   
   Please handle the `sys` database before dispatching by the `$system` suffix. 
`Identifier("sys", "catalog_options")` has no suffix, so it falls through to 
`TableSchemaExists()`, which rejects global system tables. With 
`catalog-options-table.enabled=true`, this table was previously readable 
through the path-based scan/read factories, but this PR makes those factories 
reject system-table paths and direct callers to `Catalog::GetTable()`. 
Consequently there is no working public entry point for this filesystem-catalog 
table. Add global-system-table dispatch here, as in `RestCatalog::GetTable()`, 
and cover it through the public catalog API.



-- 
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]

Reply via email to