You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/10/20 06:44:10 UTC

[GitHub] [doris] adonis0147 commented on a diff in pull request #13428: [feature-wip](array) remove array config and check array nested depth

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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org