Gabriel39 commented on code in PR #69171:
URL: https://github.com/apache/doris/pull/69171#discussion_r4306569960
##########
be/src/format/parquet/schema_desc.cpp:
##########
@@ -316,12 +317,8 @@ std::pair<DataTypePtr, bool>
FieldDescriptor::convert_to_doris_type(
} else if (logicalType.__isset.JSON) {
ans.first = DataTypeFactory::instance().create_data_type(TYPE_STRING,
nullable);
} else if (logicalType.__isset.UUID) {
- if (_enable_mapping_varbinary) {
- ans.first =
DataTypeFactory::instance().create_data_type(TYPE_VARBINARY, nullable, -1,
- -1, 16);
- } else {
- ans.first =
DataTypeFactory::instance().create_data_type(TYPE_STRING, nullable);
- }
+ // The raw-binary default must not override UUID's existing
canonical-text contract.
+ ans.first = DataTypeFactory::instance().create_data_type(TYPE_STRING,
nullable);
Review Comment:
Fixed in 32fd2fedcdb. Legacy Parquet now retains its raw carrier for an
explicit VARBINARY destination; legacy ORC decodes the annotated binary carrier
directly for BINARY targets; V2 converts native UUID values to the original
big-endian 16 bytes. These paths also preserve nested values and NULLs.
Added scalar/array cast tests, direct legacy Parquet reader coverage with
plain/dictionary fixtures over 37-row batches and multiple row groups, and a
Hive Parquet/ORC regression covering arrays/maps/structs, empty collections,
NULLs, strict modes and scanner settings. The legacy-reader test is explicit
because timestamp-semantics negotiation can force Parquet V2 despite the
session flag.
Validated the old-code failures (36-byte text instead of 16 bytes,
unsupported UUID-to-VARBINARY cast) and the fixed results: all four focused C++
tests and four regression suites passed on an ASAN BE build. Existing native
UUID TVF behavior remains covered.
--
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]