github-actions[bot] commented on code in PR #63192:
URL: https://github.com/apache/doris/pull/63192#discussion_r3254080634


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java:
##########
@@ -1058,13 +1058,23 @@ public TFileFormatType getFileFormatType() throws 
UserException {
         if (icebergFormat.equalsIgnoreCase("parquet")) {
             type = TFileFormatType.FORMAT_PARQUET;
         } else if (icebergFormat.equalsIgnoreCase("orc")) {
+            validateVariantReadSupported(icebergFormat);
             type = TFileFormatType.FORMAT_ORC;
         } else {
             throw new DdlException(String.format("Unsupported format name: %s 
for iceberg table.", icebergFormat));
         }
         return type;
     }
 
+    private void validateVariantReadSupported(String icebergFormat) throws 
DdlException {
+        for (SlotDescriptor slot : desc.getSlots()) {
+            if (slot.getColumn().getType().isVariantType()) {

Review Comment:
   This check only rejects slots whose top-level Doris type is `VARIANT`, but 
this PR maps Iceberg VARIANT recursively inside complex types. For an ORC 
Iceberg table with a column like `STRUCT<v: VARIANT>` (or `ARRAY<VARIANT>` / 
map value VARIANT), the slot type is struct/array/map, so `isVariantType()` is 
false and the scan reaches BE instead of failing with the Parquet-only error. 
Please make the read-side validation recursive over complex Doris types (or 
reuse the Iceberg schema traversal used for write validation) and add ORC 
coverage for nested VARIANT inside a complex column.



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


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

Reply via email to