This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.2 by this push:
     new 9f63be85cea branch-4.2: [fix](iceberg) Align scan schema carrier names 
by field id (#69382) (#69709)
9f63be85cea is described below

commit 9f63be85cead9fb8f295dd6ac74ebf0c6f1bfa8e
Author: daidai <[email protected]>
AuthorDate: Wed Oct 28 16:50:20 2026 +0800

    branch-4.2: [fix](iceberg) Align scan schema carrier names by field id 
(#69382) (#69709)
    
    pick #69382
    
    4.2 still uses the legacy IcebergScanNode/IcebergUtils path. The fix
    therefore resolves identity partition keys and values from the
    query-pinned scan schema by Iceberg field id, so path_partition_keys,
    schema info, and range partition metadata stay aligned. The master-only
    fe-connector dictionary/lowercasing changes are not applicable to this
    path.
---
 .../doris/datasource/iceberg/IcebergUtils.java     |  58 ++++++-
 .../datasource/iceberg/source/IcebergScanNode.java |  20 ++-
 .../doris/datasource/iceberg/IcebergUtilsTest.java |  47 ++++++
 .../iceberg/source/IcebergScanNodeTest.java        |  30 ++++
 .../test_iceberg_scan_schema_carrier_names.out     |  36 +++++
 .../test_iceberg_scan_schema_carrier_names.groovy  | 166 +++++++++++++++++++++
 6 files changed, 348 insertions(+), 9 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java
 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java
index 7d82c8dadc1..85d2036e468 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java
@@ -1048,20 +1048,35 @@ public class IcebergUtils {
         return getIdentityPartitionColumns(table, false, false);
     }
 
+    public static List<String> getIdentityPartitionColumns(Table table, Schema 
scanSchema) {
+        return getIdentityPartitionColumns(table, scanSchema, false, false);
+    }
+
     public static List<String> getIdentityPartitionColumns(Table table,
             boolean enableMappingVarbinary, boolean enableMappingTimestampTz) {
+        return getIdentityPartitionColumns(
+                table, table.schema(), enableMappingVarbinary, 
enableMappingTimestampTz);
+    }
+
+    /**
+     * Resolve identity partition names against the schema that owns this 
scan, rather than the
+     * table's latest schema. A pinned snapshot can expose a renamed field 
whose case-sensitive
+     * name must match the scan slots in {@code scanSchema}.
+     */
+    public static List<String> getIdentityPartitionColumns(Table table, Schema 
scanSchema,
+            boolean enableMappingVarbinary, boolean enableMappingTimestampTz) {
         LinkedHashSet<String> partitionColumns = new LinkedHashSet<>();
         for (PartitionSpec spec : table.specs().values()) {
             for (PartitionField partitionField : spec.fields()) {
                 if (!partitionField.transform().isIdentity()) {
                     continue;
                 }
-                NestedField sourceField = 
table.schema().findField(partitionField.sourceId());
+                NestedField sourceField = 
scanSchema.findField(partitionField.sourceId());
                 if (sourceField == null || !isSupportedPartitionValueType(
                         sourceField.type(), enableMappingVarbinary, 
enableMappingTimestampTz)) {
                     continue;
                 }
-                String columnName = 
table.schema().findColumnName(partitionField.sourceId());
+                String columnName = topLevelSourceColumnName(scanSchema, 
partitionField.sourceId());
                 if (columnName != null) {
                     partitionColumns.add(columnName);
                 }
@@ -1079,11 +1094,21 @@ public class IcebergUtils {
         return getCommonIdentityPartitionColumns(table, false, false);
     }
 
+    public static List<String> getCommonIdentityPartitionColumns(Table table, 
Schema scanSchema) {
+        return getCommonIdentityPartitionColumns(table, scanSchema, false, 
false);
+    }
+
     public static List<String> getCommonIdentityPartitionColumns(Table table,
             boolean enableMappingVarbinary, boolean enableMappingTimestampTz) {
+        return getCommonIdentityPartitionColumns(
+                table, table.schema(), enableMappingVarbinary, 
enableMappingTimestampTz);
+    }
+
+    public static List<String> getCommonIdentityPartitionColumns(Table table, 
Schema scanSchema,
+            boolean enableMappingVarbinary, boolean enableMappingTimestampTz) {
         LinkedHashSet<Integer> commonSourceIds = new LinkedHashSet<>();
         for (PartitionField field : table.spec().fields()) {
-            NestedField sourceField = 
table.schema().findField(field.sourceId());
+            NestedField sourceField = scanSchema.findField(field.sourceId());
             if (field.transform().isIdentity() && sourceField != null
                     && isSupportedPartitionValueType(
                             sourceField.type(), enableMappingVarbinary, 
enableMappingTimestampTz)) {
@@ -1098,19 +1123,35 @@ public class IcebergUtils {
             commonSourceIds.retainAll(specIdentitySourceIds);
         }
         return commonSourceIds.stream()
-                .map(table.schema()::findColumnName)
+                .map(sourceId -> topLevelSourceColumnName(scanSchema, 
sourceId))
                 .filter(columnName -> columnName != null)
                 .collect(Collectors.toList());
     }
 
     public static Map<String, String> 
getIdentityPartitionInfoMap(PartitionData partitionData,
             PartitionSpec partitionSpec, Table table, String timeZone) {
-        return getIdentityPartitionInfoMap(partitionData, partitionSpec, 
table, timeZone, false, false);
+        return getIdentityPartitionInfoMap(
+                partitionData, partitionSpec, table, timeZone, false, false);
+    }
+
+    public static Map<String, String> getIdentityPartitionInfoMap(
+            PartitionData partitionData, PartitionSpec partitionSpec, Schema 
scanSchema,
+            String timeZone) {
+        return getIdentityPartitionInfoMap(
+                partitionData, partitionSpec, scanSchema, timeZone, false, 
false);
     }
 
     public static Map<String, String> 
getIdentityPartitionInfoMap(PartitionData partitionData,
             PartitionSpec partitionSpec, Table table, String timeZone,
             boolean enableMappingVarbinary, boolean enableMappingTimestampTz) {
+        return getIdentityPartitionInfoMap(
+                partitionData, partitionSpec, table.schema(), timeZone,
+                enableMappingVarbinary, enableMappingTimestampTz);
+    }
+
+    public static Map<String, String> 
getIdentityPartitionInfoMap(PartitionData partitionData,
+            PartitionSpec partitionSpec, Schema scanSchema, String timeZone,
+            boolean enableMappingVarbinary, boolean enableMappingTimestampTz) {
         Map<String, String> partitionInfoMap = Maps.newLinkedHashMap();
         List<NestedField> fields = 
partitionData.getPartitionType().asNestedType().fields();
         List<PartitionField> partitionFields = partitionSpec.fields();
@@ -1128,7 +1169,7 @@ public class IcebergUtils {
                 continue;
             }
 
-            String columnName = 
table.schema().findColumnName(partitionField.sourceId());
+            String columnName = topLevelSourceColumnName(scanSchema, 
partitionField.sourceId());
             if (columnName == null) {
                 continue;
             }
@@ -1143,6 +1184,11 @@ public class IcebergUtils {
         return partitionInfoMap;
     }
 
+    private static String topLevelSourceColumnName(Schema schema, int 
sourceId) {
+        NestedField field = schema.asStruct().field(sourceId);
+        return field == null ? null : field.name();
+    }
+
     private static boolean 
isSupportedPartitionValueType(org.apache.iceberg.types.Type type,
             boolean enableMappingVarbinary, boolean enableMappingTimestampTz) {
         TypeID typeId = type.typeId();
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java
 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java
index 06fb012c1ec..998e5152df8 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java
@@ -324,6 +324,7 @@ public class IcebergScanNode extends FileQueryScanNode {
             icebergTable = source.getIcebergTable();
             icebergTable = useFrozenTableGeneration(icebergTable);
             partitionMapInfos = new HashMap<>();
+            getQuerySchema();
             initializePartitionMetadata();
             isPartitionedTable = icebergTable.spec().isPartitioned();
             hasPartitionedSpec = IcebergUtils.hasPartitionedSpec(icebergTable);
@@ -517,6 +518,7 @@ public class IcebergScanNode extends FileQueryScanNode {
             orderedPartitionMetadataKeys = Collections.emptyList();
             return;
         }
+        Schema scanSchema = getPartitionMetadataScanSchema();
         enableMappingVarbinaryForPartitionMetadata = 
getEnableMappingVarbinary();
         enableMappingTimestampTzForPartitionMetadata = 
getEnableMappingTimestampTz();
         if (sessionVariable.enableFileScannerV2) {
@@ -527,20 +529,31 @@ public class IcebergScanNode extends FileQueryScanNode {
             // for the column (a spec without it) are unaffected: the v2 
column mapper falls back to the
             // physical field when the split has no partition value for a 
partition key.
             orderedPathPartitionKeys = Collections.unmodifiableList(
-                    IcebergUtils.getIdentityPartitionColumns(icebergTable,
+                    IcebergUtils.getIdentityPartitionColumns(icebergTable, 
scanSchema,
                             enableMappingVarbinaryForPartitionMetadata,
                             enableMappingTimestampTzForPartitionMetadata));
         } else {
             // v1 has no such per-file fallback: a partition key it cannot 
fill from the split is not read
             // from the file either. Keep the columns common to all specs so 
those files stay readable.
             orderedPathPartitionKeys = Collections.unmodifiableList(
-                    
IcebergUtils.getCommonIdentityPartitionColumns(icebergTable,
+                    
IcebergUtils.getCommonIdentityPartitionColumns(icebergTable, scanSchema,
                             enableMappingVarbinaryForPartitionMetadata,
                             enableMappingTimestampTzForPartitionMetadata));
         }
         orderedPartitionMetadataKeys = orderedPathPartitionKeys;
     }
 
+    private Schema getPartitionMetadataScanSchema() {
+        if (plannedScanSchema != null) {
+            return plannedScanSchema;
+        }
+        if (querySchema != null) {
+            return querySchema;
+        }
+        return Preconditions.checkNotNull(
+                icebergTable.schema(), "Schema for Iceberg scan is null");
+    }
+
     @VisibleForTesting
     void setPartitionValues(TFileRangeDesc rangeDesc, Map<String, String> 
partitionValues) {
         rangeDesc.unsetColumnsFromPathKeys();
@@ -2598,6 +2611,7 @@ public class IcebergScanNode extends FileQueryScanNode {
 
     private Split createIcebergSplit(FileScanTask fileScanTask) throws 
UserException {
         DataFile dataFile = fileScanTask.file();
+        Schema scanSchema = getPartitionMetadataScanSchema();
         String originalPath = dataFile.path().toString();
         LocationPath locationPath = createLocationPathWithCache(originalPath);
         IcebergSplit split = new IcebergSplit(
@@ -2659,7 +2673,7 @@ public class IcebergScanNode extends FileQueryScanNode {
                     .anyMatch(field -> field.transform().isIdentity())) {
                 Map<String, String> partitionInfoMap = 
partitionMapInfos.computeIfAbsent(
                         Pair.of(specId, partitionData), k -> 
IcebergUtils.getIdentityPartitionInfoMap(
-                                partitionData, partitionSpec, icebergTable, 
sessionVariable.getTimeZone(),
+                                partitionData, partitionSpec, scanSchema, 
sessionVariable.getTimeZone(),
                                 enableMappingVarbinaryForPartitionMetadata,
                                 enableMappingTimestampTzForPartitionMetadata));
                 // A spec may mix identity and transformed fields. Keep its 
identity values so a
diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/IcebergUtilsTest.java
 
b/fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/IcebergUtilsTest.java
index bdb5e593f7c..d81eac120f8 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/IcebergUtilsTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/IcebergUtilsTest.java
@@ -1091,6 +1091,31 @@ public class IcebergUtilsTest {
         Assert.assertEquals(Arrays.asList("Dt", "id"), 
IcebergUtils.getIdentityPartitionColumns(table));
     }
 
+    @Test
+    public void testIdentityPartitionColumnsUseAuthoritativeScanSchema() {
+        Schema pinnedSchema = new Schema(
+                Types.NestedField.required(1, "id", Types.IntegerType.get()),
+                Types.NestedField.required(2, "City", Types.StringType.get()));
+        Schema currentSchema = new Schema(
+                Types.NestedField.required(1, "id", Types.IntegerType.get()),
+                Types.NestedField.required(2, "city_name", 
Types.StringType.get()));
+        PartitionSpec spec = PartitionSpec.builderFor(pinnedSchema)
+                .identity("City")
+                .build();
+
+        Table table = Mockito.mock(Table.class);
+        Mockito.when(table.schema()).thenReturn(currentSchema);
+        Mockito.when(table.spec()).thenReturn(spec);
+        
Mockito.when(table.specs()).thenReturn(Collections.singletonMap(spec.specId(), 
spec));
+
+        Assert.assertEquals(Collections.singletonList("City"),
+                IcebergUtils.getIdentityPartitionColumns(table, pinnedSchema));
+        Assert.assertEquals(Collections.singletonList("city_name"),
+                IcebergUtils.getIdentityPartitionColumns(table, 
currentSchema));
+        Assert.assertEquals(Collections.singletonList("City"),
+                IcebergUtils.getCommonIdentityPartitionColumns(table, 
pinnedSchema));
+    }
+
     @Test
     public void testGetCommonIdentityPartitionColumnsUsesSafeIntersection() {
         Schema schema = new Schema(
@@ -1141,6 +1166,28 @@ public class IcebergUtilsTest {
         Assert.assertEquals(Collections.singletonMap("Dt", "2025-01-01"), 
partitionInfoMap);
     }
 
+    @Test
+    public void testIdentityPartitionInfoMapUsesAuthoritativeScanSchema() {
+        Schema pinnedSchema = new Schema(
+                Types.NestedField.required(1, "id", Types.IntegerType.get()),
+                Types.NestedField.required(2, "City", Types.StringType.get()));
+        Schema currentSchema = new Schema(
+                Types.NestedField.required(1, "id", Types.IntegerType.get()),
+                Types.NestedField.required(2, "city_name", 
Types.StringType.get()));
+        PartitionSpec partitionSpec = PartitionSpec.builderFor(pinnedSchema)
+                .identity("City")
+                .build();
+        PartitionData partitionData = new 
PartitionData(partitionSpec.partitionType());
+        partitionData.set(0, "Beijing");
+
+        Assert.assertEquals(Collections.singletonMap("City", "Beijing"),
+                IcebergUtils.getIdentityPartitionInfoMap(
+                        partitionData, partitionSpec, pinnedSchema, "UTC"));
+        Assert.assertEquals(Collections.singletonMap("city_name", "Beijing"),
+                IcebergUtils.getIdentityPartitionInfoMap(
+                        partitionData, partitionSpec, currentSchema, "UTC"));
+    }
+
     @Test
     public void testMappedTypesAreExcludedFromPartitionMetadata() {
         Schema schema = new Schema(
diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/source/IcebergScanNodeTest.java
 
b/fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/source/IcebergScanNodeTest.java
index f997dce4a91..12bfe0356a2 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/source/IcebergScanNodeTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/source/IcebergScanNodeTest.java
@@ -175,6 +175,36 @@ public class IcebergScanNodeTest {
         Assert.assertEquals("", node.getHiveParquetTimeZone());
     }
 
+    @Test
+    public void testPartitionMetadataUsesQuerySchemaFieldId() throws Exception 
{
+        Schema pinnedSchema = new Schema(
+                Types.NestedField.required(1, "id", Types.IntegerType.get()),
+                Types.NestedField.required(2, "City", Types.StringType.get()));
+        Schema currentSchema = new Schema(
+                Types.NestedField.required(1, "id", Types.IntegerType.get()),
+                Types.NestedField.required(2, "city_name", 
Types.StringType.get()));
+        PartitionSpec spec = PartitionSpec.builderFor(pinnedSchema)
+                .identity("City")
+                .build();
+        Table table = Mockito.mock(Table.class);
+        Mockito.when(table.schema()).thenReturn(currentSchema);
+        Mockito.when(table.spec()).thenReturn(spec);
+        
Mockito.when(table.specs()).thenReturn(Collections.singletonMap(spec.specId(), 
spec));
+
+        SessionVariable sessionVariable = new SessionVariable();
+        sessionVariable.enableFileScannerV2 = true;
+        TestIcebergScanNode node = new TestIcebergScanNode(sessionVariable);
+        setIcebergTable(node, table);
+        setPrivateField(node, "querySchema", pinnedSchema);
+
+        Assert.assertEquals(ImmutableList.of("City"), 
orderedPathPartitionKeys(node));
+
+        setPrivateField(node, "querySchema", currentSchema);
+        setPrivateField(node, "orderedPathPartitionKeys", null);
+        setPrivateField(node, "orderedPartitionMetadataKeys", null);
+        Assert.assertEquals(ImmutableList.of("city_name"), 
orderedPathPartitionKeys(node));
+    }
+
     @SuppressWarnings("unchecked")
     private static Optional<Map<Integer, List<String>>> extractNameMapping(
             IcebergScanNode node) throws Exception {
diff --git 
a/regression-test/data/external_table_p0/iceberg/test_iceberg_scan_schema_carrier_names.out
 
b/regression-test/data/external_table_p0/iceberg/test_iceberg_scan_schema_carrier_names.out
new file mode 100644
index 00000000000..cfaef1ef1ed
--- /dev/null
+++ 
b/regression-test/data/external_table_p0/iceberg/test_iceberg_scan_schema_carrier_names.out
@@ -0,0 +1,36 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !mixed_case_scan --
+1      one
+2      two
+3      three
+
+-- !mixed_case_topn --
+one
+two
+
+-- !mixed_case_nested --
+1      11      alpha
+2      22      beta
+3      33      gamma
+
+-- !pinned_partition_schema --
+1      Beijing
+2      Beijing
+
+-- !pinned_partition_filter --
+1      Beijing
+2      Beijing
+
+-- !pinned_partition_topn --
+1      Beijing
+
+-- !current_partition_schema --
+1      Beijing
+2      Beijing
+3      Shanghai
+
+-- !pinned_count --
+2
+
+-- !current_count --
+3
diff --git 
a/regression-test/suites/external_table_p0/iceberg/test_iceberg_scan_schema_carrier_names.groovy
 
b/regression-test/suites/external_table_p0/iceberg/test_iceberg_scan_schema_carrier_names.groovy
new file mode 100644
index 00000000000..710fa23e590
--- /dev/null
+++ 
b/regression-test/suites/external_table_p0/iceberg/test_iceberg_scan_schema_carrier_names.groovy
@@ -0,0 +1,166 @@
+// 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.
+
+suite("test_iceberg_scan_schema_carrier_names",
+        "p0,external,iceberg,external_docker,external_docker_iceberg") {
+    String enabled = context.config.otherConfigs.get("enableIcebergTest")
+    if (enabled == null || !enabled.equalsIgnoreCase("true")) {
+        logger.info("disable iceberg test")
+        return
+    }
+
+    String restPort = context.config.otherConfigs.get("iceberg_rest_uri_port")
+    String minioPort = context.config.otherConfigs.get("iceberg_minio_port")
+    String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
+
+    sql """drop catalog if exists test_iceberg_scan_schema_carrier_names"""
+
+    spark_iceberg_multi """
+        SET spark.sql.shuffle.partitions=1;
+        CREATE DATABASE IF NOT EXISTS 
demo.iceberg_scan_schema_carrier_names_db;
+        DROP TABLE IF EXISTS 
demo.iceberg_scan_schema_carrier_names_db.mixed_case_orc;
+        CREATE TABLE demo.iceberg_scan_schema_carrier_names_db.mixed_case_orc (
+            ID INT,
+            Name STRING,
+            Payload STRUCT<Child: INT, Other: STRING>
+        ) USING iceberg
+        TBLPROPERTIES (
+            'format-version'='2',
+            'write.format.default'='orc'
+        );
+        INSERT INTO demo.iceberg_scan_schema_carrier_names_db.mixed_case_orc
+        SELECT /*+ COALESCE(1) */ id, name, payload
+        FROM VALUES
+            (1, 'one', named_struct('Child', 11, 'Other', 'alpha')),
+            (2, 'two', named_struct('Child', 22, 'Other', 'beta')),
+            (3, 'three', named_struct('Child', 33, 'Other', 'gamma'))
+            AS t(id, name, payload);
+
+        DROP TABLE IF EXISTS 
demo.iceberg_scan_schema_carrier_names_db.mixed_case_partition_orc;
+        CREATE TABLE 
demo.iceberg_scan_schema_carrier_names_db.mixed_case_partition_orc (
+            id INT,
+            City STRING
+        ) USING iceberg
+        PARTITIONED BY (City)
+        TBLPROPERTIES (
+            'format-version'='2',
+            'write.format.default'='orc'
+        );
+        INSERT INTO 
demo.iceberg_scan_schema_carrier_names_db.mixed_case_partition_orc
+        VALUES (1, 'Beijing'), (2, 'Beijing');
+    """
+
+    sql """
+        CREATE CATALOG test_iceberg_scan_schema_carrier_names PROPERTIES (
+            'type'='iceberg',
+            'iceberg.catalog.type'='rest',
+            'uri'='http://${externalEnvIp}:${restPort}',
+            's3.access_key'='admin',
+            's3.secret_key'='password',
+            's3.endpoint'='http://${externalEnvIp}:${minioPort}',
+            's3.region'='us-east-1',
+            'meta.cache.iceberg.table.ttl-second'='0',
+            'meta.cache.iceberg.schema.ttl-second'='0'
+        )
+    """
+
+    try {
+        sql """
+            ALTER TABLE
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_partition_orc`
+            CREATE TAG mixed_case_initial
+        """
+
+        spark_iceberg_multi """
+            ALTER TABLE 
demo.iceberg_scan_schema_carrier_names_db.mixed_case_partition_orc
+                RENAME COLUMN City TO city_name;
+            INSERT INTO 
demo.iceberg_scan_schema_carrier_names_db.mixed_case_partition_orc
+            VALUES (3, 'Shanghai');
+        """
+        sql """refresh catalog test_iceberg_scan_schema_carrier_names"""
+
+        qt_mixed_case_scan """
+            SELECT ID, Name
+            FROM
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_orc`
+            ORDER BY ID
+        """
+
+        qt_mixed_case_topn """
+            SELECT Name
+            FROM
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_orc`
+            ORDER BY ID
+            LIMIT 2
+        """
+
+        qt_mixed_case_nested """
+            SELECT ID, Payload.Child, Payload.Other
+            FROM
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_orc`
+            ORDER BY ID
+        """
+
+        qt_pinned_partition_schema """
+            SELECT id, City
+            FROM
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_partition_orc`
+            FOR VERSION AS OF 'mixed_case_initial'
+            ORDER BY id
+        """
+
+        qt_pinned_partition_filter """
+            SELECT id, City
+            FROM
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_partition_orc`
+            FOR VERSION AS OF 'mixed_case_initial'
+            WHERE City = 'Beijing'
+            ORDER BY id
+        """
+
+        qt_pinned_partition_topn """
+            SELECT id, City
+            FROM
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_partition_orc`
+            FOR VERSION AS OF 'mixed_case_initial'
+            ORDER BY id
+            LIMIT 1
+        """
+
+        qt_current_partition_schema """
+            SELECT id, city_name
+            FROM
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_partition_orc`
+            ORDER BY id
+        """
+
+        qt_pinned_count """
+            SELECT COUNT(*)
+            FROM
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_partition_orc`
+            FOR VERSION AS OF 'mixed_case_initial'
+        """
+
+        qt_current_count """
+            SELECT COUNT(*)
+            FROM
+                
`test_iceberg_scan_schema_carrier_names`.`iceberg_scan_schema_carrier_names_db`.`mixed_case_partition_orc`
+        """
+    } finally {
+        sql """drop catalog if exists test_iceberg_scan_schema_carrier_names"""
+    }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to