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


##########
fe/fe-core/src/main/java/org/apache/doris/tablefunction/ExternalFileTableValuedFunction.java:
##########
@@ -253,12 +253,9 @@ && getTFileType() != TFileType.FILE_S3) {
             throw new AnalysisException("Lance format is supported only by 
local() and s3() TVFs");
         }
 
-        // The catalog property was removed, but this TVF-only option must 
remain explicit because
-        // changing an ad-hoc TVF result schema also breaks CTAS type 
inference.
-        String enableMappingVarbinaryStr = getOrDefaultAndRemove(copiedProps,
-                FileFormatConstants.PROP_ENABLE_MAPPING_VARBINARY, "false");
-        fileFormatProperties.enableMappingVarbinary = 
Boolean.parseBoolean(enableMappingVarbinaryStr);
-
+        // Binary file fields must preserve bytes even when a legacy opt-out 
is supplied.
+        copiedProps.remove(FileFormatConstants.PROP_ENABLE_MAPPING_VARBINARY);
+        fileFormatProperties.enableMappingVarbinary = true;

Review Comment:
   [P2] Keep Parquet ENUM columns textual with the new binary default
   
   This also changes ENUM-annotated BYTE_ARRAY columns from STRING to 
VARBINARY. Schema discovery always uses the V1 ParquetReader, whose 
logical/converted-type switches omit ENUM and fall back to BYTE_ARRAY; the 
changed group6/byte_array.parquet golden already shows enum_smith becoming hex. 
[Parquet defines ENUM as UTF-8 text for applications without a native enum 
type](https://parquet.apache.org/docs/file-format/types/logicaltypes/#enum). As 
a result, CTAS selecting only an ENUM field now fails the VARBINARY 
create-table check, even when enable_mapping_varbinary=false is supplied. 
Handle both modern and legacy ENUM annotations as STRING during schema 
inference, and keep the ENUM golden expectations textual.



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