Copilot commented on code in PR #11237:
URL: https://github.com/apache/gravitino/pull/11237#discussion_r3303568353
##########
flink-connector/flink-common/src/main/java/org/apache/gravitino/flink/connector/paimon/GravitinoPaimonCatalog.java:
##########
@@ -88,7 +87,7 @@ public void dropTable(ObjectPath tablePath, boolean
ignoreIfNotExists)
@Override
public Optional<Factory> getFactory() {
- return Optional.of(new FlinkTableFactory());
+ return paimonCatalog.getFactory();
}
Review Comment:
This change alters Flink factory resolution behavior (delegating
`getFactory()` to the underlying Paimon catalog), but there’s no test guarding
against regressions. Please add a focused test that builds a
`CatalogFactory.Context`, creates both a raw Paimon catalog via
`FlinkCatalogFactory#createCatalog(context)` and a `GravitinoPaimonCatalog`
with the same context, and asserts that `getFactory()` returns the same
`Factory` (or at least the same factory class/identifier) as the underlying
Paimon catalog. This will catch future accidental reintroduction of a
standalone/no-arg factory.
--
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]