This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch auto-pick-64331-branch-4.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 6e92f4fbd8d250f3e25a28998e3f81e2e8d926e7 Author: zhangstar333 <[email protected]> AuthorDate: Wed Jun 10 09:38:49 2026 +0800 [bug](iceberg) mapping iceberg varint type to unsupported type (#64331) ### What problem does this PR solve? ``` mysql> select * from test_variant_repro; ERROR 1105 (HY000): errCode = 2, detailMessage = IllegalArgumentException: Cannot transform unknown type: variant mysql> mysql> select id from test_variant_repro; ERROR 1105 (HY000): errCode = 2, detailMessage = IllegalArgumentException: Cannot transform unknown type: variant mysql> ``` now iceberg varint type not support in doris, so could mapping it to unsupported type, this will not affect others columns, eg, if only select id from table , it's could work well Problem Summary: ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [x] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [x] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [x] No. - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into --> --- .../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 75db779d157..ab615648bbb 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 @@ -622,6 +622,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]
