adonis0147 commented on code in PR #13428:
URL: https://github.com/apache/doris/pull/13428#discussion_r1000202738
##########
be/src/vec/data_types/data_type_array.cpp:
##########
@@ -210,13 +217,9 @@ Status DataTypeArray::from_string(ReadBuffer& rb, IColumn*
column) const {
// dispose the case of [123,,,]
if (nested_str_len == 0) {
- if (nested_column.is_nullable()) {
- auto& nested_null_col =
reinterpret_cast<ColumnNullable&>(nested_column);
- nested_null_col.get_nested_column().insert_default();
- nested_null_col.get_null_map_data().push_back(0);
- } else {
- nested_column.insert_default();
- }
+ auto& nested_null_col =
reinterpret_cast<ColumnNullable&>(nested_column);
+ nested_null_col.get_nested_column().insert_default();
+ nested_null_col.get_null_map_data().push_back(0);
Review Comment:
We should check whether the nested column is nullable here. In future, we
may enable the `not_null` syntax to create an array with the elements which are
all not nullable.
--
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]