mrhhsg commented on code in PR #63528:
URL: https://github.com/apache/doris/pull/63528#discussion_r3308834357
##########
be/src/core/data_type_serde/complex_type_deserialize_util.h:
##########
@@ -85,6 +85,16 @@ struct ComplexTypeDeserializeUtil {
return false;
}
+ static Status process_field(const DataTypeSerDeSPtr& serde, StringRef str,
Field& field) {
+ str = str.trim_whitespace();
+ if (is_null_string(str)) {
+ field = Field::create_field<TYPE_NULL>(Null {});
+ return Status::OK();
+ }
+ auto str_without_quote = str.trim_quote();
+ return serde->from_fe_string(str_without_quote.to_string(), field);
Review Comment:
Addressed in dc36a4b32e5.
- `ComplexTypeDeserializeUtil::process_field()` now unwraps
`DataTypeNullableSerDe` for non-NULL default literals before calling
`from_fe_string()`, so nested conversion failures are returned instead of being
silently converted to NULL.
- Kept explicit `null` handling before unwrapping, so nullable nested
default elements still work.
- Added regression coverage for type-mismatched ARRAY element, MAP key, MAP
value, and STRUCT field defaults; these now fail with nested parse errors
during default materialization.
Validated locally:
- `build-support/clang-format.sh`
- `build-support/check-format.sh`
- `git diff --check`
- `./build.sh --be`
- `doris-local-regression --network 10.26.20.3/24 run -d
datatype_p0/complex_types -s test_complex_default_value`
--
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]