diqiu50 commented on code in PR #11349:
URL: https://github.com/apache/gravitino/pull/11349#discussion_r3363219117
##########
flink-connector/flink-common/src/main/java/org/apache/gravitino/flink/connector/paimon/GravitinoPaimonCatalog.java:
##########
@@ -103,6 +108,25 @@ protected AbstractCatalog realCatalog() {
// DDL — route through Gravitino (single source of truth)
//
---------------------------------------------------------------------------
+ @Override
+ protected List<String> viewDialectFallbackOrder() {
+ return Arrays.asList(Dialects.FLINK, Dialects.QUERY_DIALECT);
+ }
+
+ @Override
+ protected Representation[] buildViewRepresentations(ResolvedCatalogView
view) {
+ String sql = view.getExpandedQuery();
+ return new Representation[] {
+
SQLRepresentation.builder().withDialect(Dialects.FLINK).withSql(sql).build(),
+
SQLRepresentation.builder().withDialect(Dialects.QUERY_DIALECT).withSql(sql).build()
+ };
+ }
+
+ @Override
+ protected boolean dropTableEntry(NameIdentifier ident) {
+ return catalog().asTableCatalog().purgeTable(ident);
Review Comment:
For Paimon managed tables, we use purgeTable() to ensure data files are
cleaned up when a table is dropped from Flink
--
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]