roryqi commented on code in PR #13771:
URL: https://github.com/apache/gravitino/pull/13771#discussion_r4258888911


##########
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:
   Refined the documentation in 782c1e2e0a to contain only operator guidance: 
Hive-backed identifiers may use any casing; REST-backed identifiers must 
consistently use the casing from the initial registration; and retained 
conflicts include explicit manual cleanup and governance reapplication steps.



##########
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:
   Refined the Paimon documentation in 782c1e2e0a with the same user-facing 
guidance: Hive-backed identifiers may use any casing, REST-backed identifiers 
must reuse the initial casing, and retained conflicts list the manual cleanup 
steps.



-- 
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