amorynan commented on code in PR #24207:
URL: https://github.com/apache/doris/pull/24207#discussion_r1326854150
##########
be/src/vec/data_types/serde/data_type_nullable_serde.cpp:
##########
@@ -116,25 +118,55 @@ Status
DataTypeNullableSerDe::deserialize_column_from_hive_text_vector(IColumn&
}
Status DataTypeNullableSerDe::deserialize_one_cell_from_json(IColumn& column,
Slice& slice,
- const
FormatOptions& options) const {
+ const
FormatOptions& options,
+ int
nesting_level) const {
auto& null_column = assert_cast<ColumnNullable&>(column);
// TODO(Amory) make null literal configurable
// only slice trim quote return true make sure slice is quoted and
converted_from_string make
// sure slice is from string parse , we can parse this "null" literal as
string "null" to
// nested column , otherwise we insert null to null column
if (!(options.converted_from_string && slice.trim_quote())) {
- if (slice.size == 4 && Slice::mem_equal("null", slice.data, 4)) {
+ /*
+ * For null values in ordinary types, we use \N to represent them;
+ * for null values in nested types, we use null to represent them,
just like the json format.
+ *
+ * example:
+ * If you have three nullable columns
Review Comment:
make a note: null -> int -> NULL | null -> char family -> "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]