github-actions[bot] commented on code in PR #63322:
URL: https://github.com/apache/doris/pull/63322#discussion_r3254523071
##########
be/src/exprs/function/cast/cast_to_decimal.h:
##########
@@ -703,10 +718,16 @@ class CastToImpl<Mode, DataTypeString, ToDataType> :
public CastToBase {
} else if constexpr (Mode == CastModeType::StrictMode) {
// WON'T write nulls to nullable_col_to, just raise errors.
null_map is only used to skip invalid rows
RETURN_IF_ERROR(serde->from_string_strict_mode_batch(
- *col_from, nullable_col_to->get_nested_column(), {},
null_map));
Review Comment:
This starts feeding a nullable source null map into
`DataTypeDecimalSerDe::from_string_strict_mode_batch()`, but that serde
advances `current_offset` only after parsing a row and simply `continue`s when
`null_map[i]` is true. Null positions in `ColumnNullable` are allowed to carry
arbitrary nested string payloads, so after a skipped null with non-empty
payload the next non-null row is parsed from the wrong byte range. This can
corrupt/fail typed Variant decimal materialization when a nullable string
subcolumn is cast to decimal. Please either fix the decimal serde to advance
offsets for skipped rows or avoid this strict batch path with nullable string
payloads, and add a nullable/missing typed decimal case.
--
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]