yiguolei commented on code in PR #53843:
URL: https://github.com/apache/doris/pull/53843#discussion_r2244843308


##########
be/src/vec/data_types/serde/data_type_nullable_serde.cpp:
##########
@@ -111,6 +112,32 @@ Status 
DataTypeNullableSerDe::serialize_column_to_jsonb(const IColumn& from_colu
     return Status::OK();
 }
 
+Status DataTypeNullableSerDe::deserialize_column_from_jsonb(IColumn& column,
+                                                            const JsonbValue* 
jsonb_value,
+                                                            CastParameters& 
castParms) const {
+    auto& null_column = assert_cast<ColumnNullable&>(column);
+    if (jsonb_value->isNull()) {
+        null_column.insert_default();
+        return Status::OK();
+    } else {
+        Status st = 
nested_serde->deserialize_column_from_jsonb(null_column.get_nested_column(),
+                                                                jsonb_value, 
castParms);
+
+        if (!st.ok()) {
+            if (castParms.is_strict) {
+                return st;
+            } else {
+                // fill null if fail
+                null_column.insert_default();

Review Comment:
   这里我们不要insert default了吧? 因为可能column的实现insert default 可能是insert 0 也可能。
   我们有没有api 类似叫insert null的呢?这样含义更清晰一些。



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