You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "eldenmoon (via GitHub)" <gi...@apache.org> on 2023/03/03 15:45:12 UTC

[GitHub] [doris] eldenmoon commented on a diff in pull request #17331: [Fix](Lightweight schema Change) query error caused by array default type is unsupported

eldenmoon commented on code in PR #17331:
URL: https://github.com/apache/doris/pull/17331#discussion_r1124638416


##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -1186,14 +1204,20 @@ void DefaultValueColumnIterator::insert_default_data(const TypeInfo* type_info,
     case OLAP_FIELD_TYPE_VARCHAR:
     case OLAP_FIELD_TYPE_CHAR:
     case OLAP_FIELD_TYPE_JSONB: {
-        data_ptr = ((Slice*)mem_value)->data;
-        data_len = ((Slice*)mem_value)->size;
+        char* data_ptr = ((Slice*)mem_value)->data;
+        size_t data_len = ((Slice*)mem_value)->size;
         dst->insert_many_data(data_ptr, data_len, n);
         break;
     }
+    case OLAP_FIELD_TYPE_ARRAY: {
+        for (int i = 0; i < n; i++) {
+            dst->insert(doris::vectorized::Array(0));

Review Comment:
   why not just use dst->insert_many_default?



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