roryqi commented on code in PR #13771:
URL: https://github.com/apache/gravitino/pull/13771#discussion_r4258859079
##########
spark-connector/spark-common/src/test/java/org/apache/gravitino/spark/connector/integration/test/iceberg/SparkIcebergCatalogRestBackendIT.java:
##########
@@ -33,6 +35,17 @@
@DisabledIf("org.apache.gravitino.integration.test.util.ITUtils#isEmbedded")
public abstract class SparkIcebergCatalogRestBackendIT extends
SparkIcebergCatalogIT {
+ /**
+ * Tests replacing columns without assuming the case-sensitivity of the
catalog behind the REST
+ * service. Gravitino cannot infer that backend capability through the REST
protocol.
+ */
+ @Override
+ @Test
+ @EnabledIf("supportsReplaceColumns")
+ protected void testAlterTableReplaceColumns() {
+ runAlterTableReplaceColumnsTest(false);
Review Comment:
Added the limitation to the formal Iceberg catalog documentation in
4d0b4648e4. The new Identifier Case Behavior section documents that REST-backed
catalogs keep case-sensitive identifiers because Gravitino cannot infer the
downstream capability, and also documents the manual cleanup required for
pre-upgrade mixed-case Hive registrations.
##########
catalogs/catalog-lakehouse-paimon/src/main/java/org/apache/gravitino/catalog/lakehouse/paimon/PaimonCatalogCapability.java:
##########
@@ -23,10 +23,30 @@
public class PaimonCatalogCapability implements Capability {
+ private final boolean hiveBackend;
+
+ /** Creates a Paimon catalog capability with the default case-sensitive name
behavior. */
+ public PaimonCatalogCapability() {
+ this(false);
+ }
+
+ PaimonCatalogCapability(boolean hiveBackend) {
+ this.hiveBackend = hiveBackend;
+ }
+
@Override
public CapabilityResult columnDefaultValue() {
// See https://github.com/apache/paimon/pull/1425/files
return CapabilityResult.unsupported(
"Paimon set column default value through table properties instead of
column info.");
}
+
+ @Override
+ public CapabilityResult caseSensitiveOnName(Scope scope) {
+ if (hiveBackend && (scope == Scope.SCHEMA || scope == Scope.TABLE || scope
== Scope.VIEW)) {
Review Comment:
Also documented this for Paimon in 4d0b4648e4. The Paimon catalog docs now
cover both behaviors: Hive-backed identifiers are normalized and older
mixed-case registrations may require manual cleanup, while REST-backed
identifiers remain case-sensitive because the downstream capability cannot be
inferred.
--
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]