nastra commented on code in PR #9770:
URL: https://github.com/apache/iceberg/pull/9770#discussion_r1497719720
##########
core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java:
##########
@@ -812,4 +815,32 @@ private boolean deleteProperties(Namespace namespace,
Set<String> properties) {
protected Map<String, String> properties() {
return catalogProperties == null ? ImmutableMap.of() : catalogProperties;
}
+
+ @Override
+ public TableBuilder buildTable(TableIdentifier identifier, Schema schema) {
+ return new ViewAwareTableBuilder(identifier, schema);
+ }
+
+ /**
+ * The purpose of this class is to add view detection only when
SchemaVersion.V1 schema is used
+ * when replacing a table.
+ */
+ protected class ViewAwareTableBuilder extends
BaseMetastoreCatalogTableBuilder {
Review Comment:
for other reviewers: the `BaseMetastoreViewCatalogTableBuilder` is already
view-aware during a table replace, but the existing `TestJdbcCatalog` should be
running with schema V0 (not view-aware) as default. This makes it necessary to
override the default behavior in order to only perform the view check when
`schemaVersion == JdbcUtil.SchemaVersion.V1`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]