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


##########
be/src/exec/common/variant_util.cpp:
##########
@@ -104,6 +104,44 @@
 
 namespace doris::variant_util {
 
+static bool is_decimal_typed_path_column(const TabletColumn& column) {
+    if (column.is_array_type()) {
+        CHECK_EQ(column.get_sub_columns().size(), 1);
+        return is_decimal_typed_path_column(*column.get_sub_columns()[0]);
+    }
+    return 
is_decimal(TabletColumn::get_primitive_type_by_field_type(column.type()));
+}
+
+static void configure_decimal_number_preserve_paths(const TabletColumn& column,

Review Comment:
   This helper is only applied from `parse_and_materialize_variant_columns()`, 
after the input block already contains a scalar-root Variant that still needs 
materialization. A direct JSON stream load into a Variant column with an object 
value, for example 
`{"id":2,"v":{"number_1":999999999999999999999999999.999999999}}`, goes through 
`DataTypeVariantSerDe::deserialize_one_cell_from_json()`, where `ParseConfig` 
is created without the tablet schema's decimal typed paths. That parse builds a 
non-scalar `ColumnVariant`, so the later writer path hits `if 
(!var.is_scalar_variant()) continue;` and never reaches this configured 
materialization path. The new regression only stream-loads `v` as an escaped 
JSON string, which exercises scalar-root materialization, not the direct object 
path. Please propagate the schema-derived decimal preserve paths to direct 
Variant JSON deserialization as well, or keep object-valued stream-loads as raw 
scalar JSON until this materialization step, and add a reg
 ression where the stream-load file contains `v` as an object rather than a 
string.



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