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


##########
be/src/vec/columns/column_variant.cpp:
##########
@@ -897,12 +891,21 @@ void ColumnVariant::Subcolumn::get(size_t n, Field& res) 
const {
         return;
     }
     if (is_finalized()) {
+        if (least_common_type.get_type_id() == PrimitiveType::TYPE_ARRAY &&
+            least_common_type.get_base_type_id() == PrimitiveType::TYPE_JSONB) 
{
+            // Array of JsonbField is special case
+            get_finalized_column().get(n, res);
+            // here we will get a Array<String> Field or NULL, if it is 
Array<String>, we need to convert it to Array<JsonbField>
+            convert_array_string_to_array_jsonb(res);
+            return;
+        }
+
         if (least_common_type.get_base_type_id() == PrimitiveType::TYPE_JSONB) 
{
             // JsonbFiled is special case
             res = Field::create_field<TYPE_JSONB>(JsonbField());
+            get_finalized_column().get(n, res);
+            return;
         }
-        get_finalized_column().get(n, res);

Review Comment:
   这里的通用逻辑(非TYPE_JSONB)被删了



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

Reply via email to