From 0604e39baabdd32f3d75dd48063dda42504dc452 Mon Sep 17 00:00:00 2001 From: sharpca <110613026+sharpca@users.noreply.github.com> Date: Sun, 8 Nov 2026 00:19:17 +0800 Subject: [PATCH 1/2] [Fix][API] Make the API identifier and type matching independent of the default locale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several seatunnel-api code paths matched an identifier or a type name with String#toUpperCase()/toLowerCase() without Locale.ROOT, so the result depended on the JVM default locale of the worker. Under a Turkish or Azerbaijani locale an upper-case "I" lower-cases to a dotless "ı" and a lower-case "i" upper-cases to a dotted "İ", so a name that contains an "i" or an "I" no longer matched the constant it was compared against. PluginIdentifier#hashCode could then return a different value for two identifiers that equals considers equal, and a job that enables the metalake failed to start with "No enum constant org.apache.seatunnel.common.constants.MetaLakeType.GRAVİTİNO". Use Locale.ROOT in PluginIdentifier, MetalakeConfigUtils, MetaLakeFactory and GravitinoTableSchemaConvertor, and add a regression test to each of them. Fixes #13169 Signed-off-by: sharpca <110613026+sharpca@users.noreply.github.com> --- .../concepts/incompatible-changes.md | 7 ++ .../concepts/incompatible-changes.md | 7 ++ .../api/common/PluginIdentifier.java | 12 +++- .../api/metalake/MetaLakeFactory.java | 13 ++-- .../api/metalake/MetalakeConfigUtils.java | 12 ++-- .../GravitinoTableSchemaConvertor.java | 7 +- .../api/common/PluginIdentifierTest.java | 53 ++++++++++++++ .../api/metalake/MetalakeLocaleTest.java | 69 +++++++++++++++++++ .../GravitinoTableSchemaConvertorTest.java | 21 ++++++ 9 files changed, 185 insertions(+), 16 deletions(-) create mode 100644 seatunnel-api/src/test/java/org/apache/seatunnel/api/common/PluginIdentifierTest.java create mode 100644 seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/MetalakeLocaleTest.java diff --git a/docs/en/introduction/concepts/incompatible-changes.md b/docs/en/introduction/concepts/incompatible-changes.md index 61d47aa3e66b..f0eade31a8ad 100644 --- a/docs/en/introduction/concepts/incompatible-changes.md +++ b/docs/en/introduction/concepts/incompatible-changes.md @@ -5,6 +5,13 @@ You need to check this document before you upgrade to related version. ## dev +### API: identifier and type matching no longer follows the worker's default locale + +- **Behavior change: the API resolves the same identifier and type name on every worker** + - **Description**: Several `seatunnel-api` code paths matched an identifier or a type name with `String#toUpperCase()` / `String#toLowerCase()` without `Locale.ROOT`. Under a Turkish or Azerbaijani default locale, an upper-case `I` lower-cases to the dotless `ı` and a lower-case `i` upper-cases to the dotted `İ`, so a name that contains an `i` or an `I` no longer matched the constant it was compared against. `PluginIdentifier#hashCode` could then return a different value for two identifiers that `equals` considers equal, and a job that enables the metalake failed to start with `No enum constant org.apache.seatunnel.common.constants.MetaLakeType.GRAVİTİNO`. These conversions now use `Locale.ROOT`. + - **Impact**: Only workers whose default locale is Turkish or Azerbaijani. There, the affected lookups now resolve as they do under any other locale; previously a job that enabled the metalake failed to start and the metalake type was not converted. Workers with any other default locale are unchanged. + - **Migration Guide**: No configuration change is needed. On such a worker, a job that enables the metalake now starts instead of failing. + ### Databend source: a DECIMAL column is read as DECIMAL instead of STRING - **Behavior change: a Databend `DECIMAL(p, s)` column reaches the job as `DECIMAL(p, s)`** diff --git a/docs/zh/introduction/concepts/incompatible-changes.md b/docs/zh/introduction/concepts/incompatible-changes.md index a1fd24b43ee8..a9652c70e892 100644 --- a/docs/zh/introduction/concepts/incompatible-changes.md +++ b/docs/zh/introduction/concepts/incompatible-changes.md @@ -4,6 +4,13 @@ ## dev +### API:标识符与类型匹配不再跟随工作节点的默认语言环境 + +- **行为变更:API 在任何工作节点上解析出的标识符和类型名都保持一致** + - **描述**:`seatunnel-api` 中若干路径此前使用未指定 `Locale.ROOT` 的 `String#toUpperCase()` / `String#toLowerCase()` 匹配标识符或类型名。在土耳其语或阿塞拜疆语默认语言环境下,大写 `I` 会小写为不带点的 `ı`,小写 `i` 会大写为带点的 `İ`,因此含有 `i` 或 `I` 的名称不再匹配对应的常量:`PluginIdentifier#hashCode` 可能为两个 `equals` 判定相等的标识符返回不同的哈希值,开启元数据湖的作业会以 `No enum constant org.apache.seatunnel.common.constants.MetaLakeType.GRAVİTİNO` 启动失败。现在这些转换统一使用 `Locale.ROOT`。 + - **影响**:仅影响默认语言环境为土耳其语或阿塞拜疆语的工作节点。在这些节点上,受影响的查找现在会像其他语言环境一样正确解析;此前开启元数据湖的作业无法启动,元数据类型也无法转换。其他默认语言环境的工作节点不受影响。 + - **迁移指南**:无需修改配置。在这类节点上,开启元数据湖的作业现在可以正常启动,而不再失败。 + ### Databend Source:DECIMAL 列按 DECIMAL 读取,而不再是 STRING - **行为变更:Databend 的 `DECIMAL(p, s)` 列在作业中的类型为 `DECIMAL(p, s)`** diff --git a/seatunnel-api/src/main/java/org/apache/seatunnel/api/common/PluginIdentifier.java b/seatunnel-api/src/main/java/org/apache/seatunnel/api/common/PluginIdentifier.java index 84ee9025442e..8864e93cc002 100644 --- a/seatunnel-api/src/main/java/org/apache/seatunnel/api/common/PluginIdentifier.java +++ b/seatunnel-api/src/main/java/org/apache/seatunnel/api/common/PluginIdentifier.java @@ -19,6 +19,8 @@ import org.apache.seatunnel.shade.org.apache.commons.lang3.StringUtils; +import java.util.Locale; + /** Used to identify a plugin. */ public class PluginIdentifier { private final String engineType; @@ -69,9 +71,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - int result = engineType != null ? engineType.toLowerCase().hashCode() : 0; - result = 31 * result + (pluginType != null ? pluginType.toLowerCase().hashCode() : 0); - result = 31 * result + (pluginName != null ? pluginName.toLowerCase().hashCode() : 0); + int result = engineType != null ? engineType.toLowerCase(Locale.ROOT).hashCode() : 0; + result = + 31 * result + + (pluginType != null ? pluginType.toLowerCase(Locale.ROOT).hashCode() : 0); + result = + 31 * result + + (pluginName != null ? pluginName.toLowerCase(Locale.ROOT).hashCode() : 0); return result; } diff --git a/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/MetaLakeFactory.java b/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/MetaLakeFactory.java index b454c43882a5..df2a039baf5a 100644 --- a/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/MetaLakeFactory.java +++ b/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/MetaLakeFactory.java @@ -22,6 +22,7 @@ import org.apache.seatunnel.common.constants.MetaLakeType; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.function.Supplier; @@ -38,13 +39,13 @@ public class MetaLakeFactory { private MetaLakeFactory() {} public static void register(String type) { - CLIENT_REGISTRY.put(type.toLowerCase(), GravitinoClient::new); - MAPPER_REGISTRY.put(type.toLowerCase(), GravitinoTableSchemaConvertor::new); + CLIENT_REGISTRY.put(type.toLowerCase(Locale.ROOT), GravitinoClient::new); + MAPPER_REGISTRY.put(type.toLowerCase(Locale.ROOT), GravitinoTableSchemaConvertor::new); } public static MetalakeClient createClient(MetaLakeType metaLakeType) { - String type = metaLakeType.name().toLowerCase(); - Supplier constructor = CLIENT_REGISTRY.get(type.toLowerCase()); + String type = metaLakeType.name().toLowerCase(Locale.ROOT); + Supplier constructor = CLIENT_REGISTRY.get(type.toLowerCase(Locale.ROOT)); if (constructor == null) { throw new IllegalArgumentException("Unknown MetalakeClient type: " + type); } @@ -52,9 +53,9 @@ public static MetalakeClient createClient(MetaLakeType metaLakeType) { } public static MetaLakeTableSchemaConvertor createTypeMapper(MetaLakeType metaLakeType) { - String type = metaLakeType.name().toLowerCase(); + String type = metaLakeType.name().toLowerCase(Locale.ROOT); Supplier constructor = - MAPPER_REGISTRY.get(type.toLowerCase()); + MAPPER_REGISTRY.get(type.toLowerCase(Locale.ROOT)); if (constructor == null) { throw new IllegalArgumentException("Unknown MetaLakeTypeMapper type: " + type); } diff --git a/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/MetalakeConfigUtils.java b/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/MetalakeConfigUtils.java index ed38a5ba60d1..aa47412a7908 100644 --- a/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/MetalakeConfigUtils.java +++ b/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/MetalakeConfigUtils.java @@ -36,6 +36,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import java.util.Map; @Deprecated @@ -54,7 +55,7 @@ public static Config getMetalakeConfig(Config jobConfigTmp) { .getOrDefault( EnvCommonOptions.METALAKE_ENABLED .key() - .toUpperCase(), + .toUpperCase(Locale.ROOT), Boolean.toString(false))); if (!metalakeEnabled) return jobConfigTmp; @@ -62,13 +63,16 @@ public static Config getMetalakeConfig(Config jobConfigTmp) { String metalakeType = envConfig.hasPath(EnvCommonOptions.METALAKE_TYPE.key()) ? envConfig.getString(EnvCommonOptions.METALAKE_TYPE.key()) - : System.getenv(EnvCommonOptions.METALAKE_TYPE.key().toUpperCase()); + : System.getenv( + EnvCommonOptions.METALAKE_TYPE.key().toUpperCase(Locale.ROOT)); String metalakeUrl = envConfig.hasPath(EnvCommonOptions.METALAKE_URL.key()) ? envConfig.getString(EnvCommonOptions.METALAKE_URL.key()) - : System.getenv(EnvCommonOptions.METALAKE_URL.key().toUpperCase()); + : System.getenv( + EnvCommonOptions.METALAKE_URL.key().toUpperCase(Locale.ROOT)); MetalakeClient metalakeClient = - MetaLakeFactory.createClient(MetaLakeType.valueOf(metalakeType.toUpperCase())); + MetaLakeFactory.createClient( + MetaLakeType.valueOf(metalakeType.toUpperCase(Locale.ROOT))); update = replaceConfigList(update, PluginType.SOURCE.getType(), metalakeClient, metalakeUrl); update = replaceConfigList(update, PluginType.SINK.getType(), metalakeClient, metalakeUrl); diff --git a/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertor.java b/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertor.java index 1f085404acfd..eeecfc92373b 100644 --- a/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertor.java +++ b/seatunnel-api/src/main/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertor.java @@ -41,6 +41,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -202,7 +203,7 @@ private SeaTunnelDataType convertComplexType(String fieldName, JsonNode typeN throw CommonError.convertToSeaTunnelTypeError( MetaLakeType.GRAVITINO.getType(), typeNode.toString(), fieldName); } - String type = typeField.asText().toLowerCase(); + String type = typeField.asText().toLowerCase(Locale.ROOT); switch (type) { case "list": JsonNode elementType = typeNode.get(ELEMENT_TYPE); @@ -270,7 +271,7 @@ private SeaTunnelDataType convertComplexType(String fieldName, JsonNode typeN /** Convert simple type (string like "boolean", "integer", "decimal(10,2)", etc.). */ private SeaTunnelDataType convertSimpleType(String fieldName, JsonNode typeNode) { String gravitinoType = typeNode.asText(); - String normalizedType = gravitinoType.trim().toLowerCase(); + String normalizedType = gravitinoType.trim().toLowerCase(Locale.ROOT); // Remove parameters for simple type matching String baseType = normalizedType.split("\\(")[0].trim(); @@ -346,7 +347,7 @@ private SeaTunnelDataType convertSimpleType(String fieldName, JsonNode typeNo */ private Pair extractLengthAndScale(String type) { // Extract base type before the parenthesis - String baseType = type.split("\\(")[0].trim().toLowerCase(); + String baseType = type.split("\\(")[0].trim().toLowerCase(Locale.ROOT); // Remove 'unsigned' suffix for type matching String cleanType = baseType.replaceAll("unsigned", "").trim(); diff --git a/seatunnel-api/src/test/java/org/apache/seatunnel/api/common/PluginIdentifierTest.java b/seatunnel-api/src/test/java/org/apache/seatunnel/api/common/PluginIdentifierTest.java new file mode 100644 index 000000000000..78d9c138f415 --- /dev/null +++ b/seatunnel-api/src/test/java/org/apache/seatunnel/api/common/PluginIdentifierTest.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.api.common; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.util.Locale; + +public class PluginIdentifierTest { + + @Test + public void testEqualsIgnoresCase() { + Assertions.assertEquals( + PluginIdentifier.of("SeaTunnel", "Source", "TiDB"), + PluginIdentifier.of("seatunnel", "source", "tidb")); + Assertions.assertNotEquals( + PluginIdentifier.of("seatunnel", "source", "tidb"), + PluginIdentifier.of("seatunnel", "source", "mysql")); + } + + @Test + public void testHashCodeIsIndependentOfDefaultLocale() { + Locale defaultLocale = Locale.getDefault(); + try { + // In a Turkish or Azerbaijani locale an upper-case "I" lower-cases to + // a dotless "i", so a locale dependent hash code would differ from the + // hash code of an equal identifier. + Locale.setDefault(Locale.forLanguageTag("tr-TR")); + PluginIdentifier identifier = PluginIdentifier.of("SeaTunnel", "Source", "Iceberg"); + PluginIdentifier sameIdentifier = PluginIdentifier.of("seatunnel", "source", "iceberg"); + Assertions.assertEquals(identifier, sameIdentifier); + Assertions.assertEquals(identifier.hashCode(), sameIdentifier.hashCode()); + } finally { + Locale.setDefault(defaultLocale); + } + } +} diff --git a/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/MetalakeLocaleTest.java b/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/MetalakeLocaleTest.java new file mode 100644 index 000000000000..95ffb917b512 --- /dev/null +++ b/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/MetalakeLocaleTest.java @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.api.metalake; + +import org.apache.seatunnel.shade.com.typesafe.config.Config; +import org.apache.seatunnel.shade.com.typesafe.config.ConfigFactory; + +import org.apache.seatunnel.common.constants.MetaLakeType; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.util.Locale; + +public class MetalakeLocaleTest { + + private static final String JOB_CONFIG = + "env {\n" + + " metalake_enabled = true\n" + + " metalake_type = \"gravitino\"\n" + + " metalake_url = \"http://localhost:8090/api/metalakes/test/\"\n" + + "}\n" + + "source = []\n" + + "sink = []\n" + + "transform = []\n"; + + @Test + public void testCreateTypeMapperIsIndependentOfDefaultLocale() { + Locale defaultLocale = Locale.getDefault(); + try { + // The registry is keyed by the lower-cased type name while the lookup + // lower-cases the enum constant name, so a locale dependent conversion + // would not find the registered entry. + Locale.setDefault(Locale.forLanguageTag("tr-TR")); + Assertions.assertNotNull(MetaLakeFactory.createTypeMapper(MetaLakeType.GRAVITINO)); + } finally { + Locale.setDefault(defaultLocale); + } + } + + @Test + public void testGetMetalakeConfigIsIndependentOfDefaultLocale() { + Locale defaultLocale = Locale.getDefault(); + try { + // The configured type name "gravitino" upper-cases to "GRAVİTİNO" in a + // Turkish locale, which is not a MetaLakeType constant. + Locale.setDefault(Locale.forLanguageTag("tr-TR")); + Config config = ConfigFactory.parseString(JOB_CONFIG); + Assertions.assertNotNull(MetalakeConfigUtils.getMetalakeConfig(config)); + } finally { + Locale.setDefault(defaultLocale); + } + } +} diff --git a/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertorTest.java b/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertorTest.java index 1fe719394553..ef5eada12cf8 100644 --- a/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertorTest.java +++ b/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertorTest.java @@ -40,6 +40,7 @@ import org.junit.jupiter.api.Test; import java.util.List; +import java.util.Locale; public class GravitinoTableSchemaConvertorTest { @@ -963,4 +964,24 @@ void testBuildCatalogTableWithPostgresMetadata() throws Exception { Assertions.assertEquals("all_type", catalogTable.getTableId().getTableName()); Assertions.assertEquals(tableSchema, catalogTable.getTableSchema()); } + + @Test + void testConvertTypeIsIndependentOfDefaultLocale() throws Exception { + Locale defaultLocale = Locale.getDefault(); + try { + // In a Turkish or Azerbaijani locale a lower-case "i" is upper-cased to + // a dotted "I", so a locale dependent conversion would not match the + // type name below. + Locale.setDefault(Locale.forLanguageTag("tr-TR")); + String json = + "{\"columns\":[{\"name\":\"int_col\",\"type\":\"INTEGER\",\"nullable\":true}]}"; + JsonNode metaInfo = OBJECT_MAPPER.readTree(json); + TableSchema schema = CONVERTOR.convertor(metaInfo); + Column column = schema.getColumns().get(0); + Assertions.assertEquals("int_col", column.getName()); + Assertions.assertEquals(BasicType.INT_TYPE, column.getDataType()); + } finally { + Locale.setDefault(defaultLocale); + } + } } From 31f57240b6c4864bcc0b5897c5c401c8a0d2f7db Mon Sep 17 00:00:00 2001 From: sharpca <110613026+sharpca@users.noreply.github.com> Date: Mon, 9 Nov 2026 21:21:16 +0800 Subject: [PATCH 2/2] [Fix][API] Polish the locale regression tests for review feedback Address the two optional nits raised on #13170: - GravitinoTableSchemaConvertorTest: the covered case is an upper-case I lower-cased to a dotless i (U+0131), not a lower-case i upper-cased to a dotted I, so the comment was pointing in the wrong direction. - MetalakeLocaleTest: assert the content of the returned env block instead of only asserting that the returned config is not null. --- .../seatunnel/api/metalake/MetalakeLocaleTest.java | 13 ++++++++++++- .../GravitinoTableSchemaConvertorTest.java | 6 +++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/MetalakeLocaleTest.java b/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/MetalakeLocaleTest.java index 95ffb917b512..d49faea81b73 100644 --- a/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/MetalakeLocaleTest.java +++ b/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/MetalakeLocaleTest.java @@ -20,6 +20,8 @@ import org.apache.seatunnel.shade.com.typesafe.config.Config; import org.apache.seatunnel.shade.com.typesafe.config.ConfigFactory; +import org.apache.seatunnel.api.options.EnvCommonOptions; +import org.apache.seatunnel.common.Constants; import org.apache.seatunnel.common.constants.MetaLakeType; import org.junit.jupiter.api.Assertions; @@ -61,7 +63,16 @@ public void testGetMetalakeConfigIsIndependentOfDefaultLocale() { // Turkish locale, which is not a MetaLakeType constant. Locale.setDefault(Locale.forLanguageTag("tr-TR")); Config config = ConfigFactory.parseString(JOB_CONFIG); - Assertions.assertNotNull(MetalakeConfigUtils.getMetalakeConfig(config)); + Config metalakeConfig = MetalakeConfigUtils.getMetalakeConfig(config); + Assertions.assertNotNull(metalakeConfig); + // The env block must survive the conversion untouched. + Config envConfig = metalakeConfig.getConfig(Constants.ENV); + Assertions.assertTrue(envConfig.getBoolean(EnvCommonOptions.METALAKE_ENABLED.key())); + Assertions.assertEquals( + "gravitino", envConfig.getString(EnvCommonOptions.METALAKE_TYPE.key())); + Assertions.assertEquals( + "http://localhost:8090/api/metalakes/test/", + envConfig.getString(EnvCommonOptions.METALAKE_URL.key())); } finally { Locale.setDefault(defaultLocale); } diff --git a/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertorTest.java b/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertorTest.java index ef5eada12cf8..b0c5c5a9d19a 100644 --- a/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertorTest.java +++ b/seatunnel-api/src/test/java/org/apache/seatunnel/api/metalake/gravitino/GravitinoTableSchemaConvertorTest.java @@ -969,9 +969,9 @@ void testBuildCatalogTableWithPostgresMetadata() throws Exception { void testConvertTypeIsIndependentOfDefaultLocale() throws Exception { Locale defaultLocale = Locale.getDefault(); try { - // In a Turkish or Azerbaijani locale a lower-case "i" is upper-cased to - // a dotted "I", so a locale dependent conversion would not match the - // type name below. + // In a Turkish or Azerbaijani locale an upper-case "I" is lower-cased to + // a dotless "i" (U+0131), so a locale dependent conversion would not match + // the type name below. Locale.setDefault(Locale.forLanguageTag("tr-TR")); String json = "{\"columns\":[{\"name\":\"int_col\",\"type\":\"INTEGER\",\"nullable\":true}]}";