This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new a4052d1b56b branch-4.1: [bug](iceberg) mapping iceberg varint type to
unsupported type #64331 (#64338)
a4052d1b56b is described below
commit a4052d1b56b6cd2e7484f834b5f6e86f9896532c
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jun 10 14:13:45 2026 +0800
branch-4.1: [bug](iceberg) mapping iceberg varint type to unsupported type
#64331 (#64338)
Cherry-picked from #64331
Co-authored-by: zhangstar333 <[email protected]>
---
.../scripts/create_preinstalled_scripts/iceberg/run30.sql | 11 +++++++++++
.../org/apache/doris/datasource/iceberg/IcebergUtils.java | 2 ++
.../data/external_table_p0/iceberg/test_iceberg_varbinary.out | 2 ++
.../external_table_p0/iceberg/test_iceberg_varbinary.groovy | 11 +++++++++++
4 files changed, 26 insertions(+)
diff --git
a/docker/thirdparties/docker-compose/iceberg/scripts/create_preinstalled_scripts/iceberg/run30.sql
b/docker/thirdparties/docker-compose/iceberg/scripts/create_preinstalled_scripts/iceberg/run30.sql
new file mode 100644
index 00000000000..93e0419496f
--- /dev/null
+++
b/docker/thirdparties/docker-compose/iceberg/scripts/create_preinstalled_scripts/iceberg/run30.sql
@@ -0,0 +1,11 @@
+create database if not exists demo.test_db;
+use demo.test_db;
+CREATE TABLE test_variant_repro (
+ id INT,
+ v VARIANT
+)
+USING iceberg
+TBLPROPERTIES (
+ 'format-version' = '3',
+ 'write.format.default' = 'parquet'
+);
\ No newline at end of file
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 2a6b43e6492..df4adead31b 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
@@ -643,6 +643,8 @@ public class IcebergUtils {
icebergTypeToDorisType(x.type(),
enableMappingVarbinary, enableMappingTimestampTz)))
.collect(Collectors.toCollection(ArrayList::new));
return new StructType(nestedTypes);
+ case VARIANT:
+ return Type.UNSUPPORTED;
default:
throw new IllegalArgumentException("Cannot transform unknown
type: " + type);
}
diff --git
a/regression-test/data/external_table_p0/iceberg/test_iceberg_varbinary.out
b/regression-test/data/external_table_p0/iceberg/test_iceberg_varbinary.out
index 3d224775383..65a20f0fb7c 100644
--- a/regression-test/data/external_table_p0/iceberg/test_iceberg_varbinary.out
+++ b/regression-test/data/external_table_p0/iceberg/test_iceberg_varbinary.out
@@ -92,3 +92,5 @@
-- !select23 --
1 a 0x0FF102FDFEFF
+-- !select23 --
+
diff --git
a/regression-test/suites/external_table_p0/iceberg/test_iceberg_varbinary.groovy
b/regression-test/suites/external_table_p0/iceberg/test_iceberg_varbinary.groovy
index 62d3d367f80..cd7689e07b7 100644
---
a/regression-test/suites/external_table_p0/iceberg/test_iceberg_varbinary.groovy
+++
b/regression-test/suites/external_table_p0/iceberg/test_iceberg_varbinary.groovy
@@ -161,4 +161,15 @@ suite("test_iceberg_varbinary",
"p0,external,doris,external_docker,external_dock
qt_select23 """
select * from binary_partitioned_table where
from_hex(partition_bin)="0FF102FDFEFF";
"""
+
+ sql """ use test_db; """
+ qt_select23 """
+ select id from test_variant_repro;
+ """
+ test {
+ sql """
+ select * from test_variant_repro;
+ """
+ exception "UNSUPPORTED"
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]