amorynan commented on code in PR #54027:
URL: https://github.com/apache/doris/pull/54027#discussion_r2250307239


##########
be/src/vec/data_types/serde/data_type_nullable_serde.cpp:
##########
@@ -438,21 +438,29 @@ Status 
DataTypeNullableSerDe::read_one_cell_from_json(IColumn& column,
 
 Status DataTypeNullableSerDe::from_string(StringRef& str, IColumn& column,
                                           const FormatOptions& options) const {
-    auto& col = assert_cast<ColumnNullable&>(column);
-    auto& nested_col = col.get_nested_column();
-    Status st = nested_serde->from_string(str, nested_col, options);
+    auto& null_column = assert_cast<ColumnNullable&>(column);
+    auto st = nested_serde->from_string(str, null_column.get_nested_column(), 
options);
     if (!st.ok()) {
-        // default is null
-        col.insert_default();
+        // fill null if fail
+        null_column.insert_default();
+        return Status::OK();
     }
+    // fill not null if success
+    null_column.get_null_map_data().push_back(0);
     return Status::OK();
 }
 
+// Note that the difference between the strict mode and the non-strict mode 
here is that in the non-strict mode,
+// if an error occurs, a null value will be inserted.
+// But the problem is that in fact, only some nested complex types need to 
"inject an error and insert a null value".

Review Comment:
   what means ``` inject an error and insert a null value``` ?



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