zjw1111 commented on code in PR #222:
URL: https://github.com/apache/paimon-cpp/pull/222#discussion_r3842245326


##########
src/paimon/core/catalog/file_system_catalog.h:
##########
@@ -38,11 +39,17 @@ class FileSystem;
 class Identifier;
 class Logger;
 
-class FileSystemCatalog : public Catalog {
+class FileSystemCatalog : public Catalog, public FormatTableCatalog {

Review Comment:
   This double-inheritance capability pattern still feels too implicit to us. 
`Catalog` already exposes `GetFormatTable()`, while the actual override point 
lives on a separate `FormatTableCatalog` and is discovered through 
`dynamic_cast`. Catalog implementations therefore need to know about a second 
orthogonal base class, and the extension point is not visible from the 
`Catalog` interface itself; this also introduces an RTTI-based cross-cast.
   
   We would prefer `LoadFormatTable()` (or a protected virtual hook used by 
`GetFormatTable()`) to be a virtual function on `Catalog`, overridden directly 
by `FileSystemCatalog` and `RestCatalog`, instead of introducing this parallel 
interface. Since paimon-cpp is still in the 0.x stage and public API changes 
are allowed, preserving the current vtable should not drive this design; the 
explicit virtual contract seems like the simpler and more conventional 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