eldenmoon commented on code in PR #71194:
URL: https://github.com/apache/doris/pull/71194#discussion_r4765553722
##########
be/src/core/data_type/data_type_factory.cpp:
##########
@@ -259,11 +259,21 @@ DataTypePtr DataTypeFactory::create_data_type(const
PColumnMeta& pcolumn) {
case PGenericType::STRING:
nested = std::make_shared<DataTypeString>();
break;
- case PGenericType::VARIANT:
- nested =
std::make_shared<DataTypeVariantV2>(pcolumn.variant_max_subcolumns_count(),
-
pcolumn.variant_enable_doc_mode(),
- pcolumn.variant_is_v2());
+ case PGenericType::VARIANT: {
+ using WireFormat = DataTypeVariantV2::WireFormat;
+ // Older V1 writers omit the doc-mode field and end at the sparse map.
+ // The later V1 layout includes a doc-value map even for
doc_mode=false.
+ auto wire_format = WireFormat::V1;
+ if (pcolumn.variant_is_v2()) {
+ wire_format = WireFormat::V2;
+ } else if (pcolumn.has_variant_enable_doc_mode()) {
Review Comment:
This ambiguity affects intermediate development builds, but our 4.1.x
compatibility scope covers official releases only, and we verified that all
seven release tags write the marker even when doc mode is disabled.
--
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]