eldenmoon commented on code in PR #45487:
URL: https://github.com/apache/doris/pull/45487#discussion_r1886817376
##########
be/src/vec/columns/column_object.cpp:
##########
@@ -1000,16 +1014,18 @@ void
ColumnObject::Subcolumn::serialize_to_sparse_column(ColumnString* key, std:
// remove default
row -= num_of_defaults_in_prefix;
- is_null = false;
for (size_t i = 0; i < data.size(); ++i) {
const auto& part = data[i];
if (row < part->size()) {
- // insert key
- key->insert_data(path.data(), path.size());
- // insert value
- const auto& part_type = data_types[i];
- const auto& serde = part_type->get_serde();
- serde->write_one_cell_to_binary(*part, value, row);
+ if (assert_cast<const ColumnNullable&>(*part).is_null_at(row)) {
+ is_null = true;
+ } else {
+ is_null = false;
+ // insert key
+ key->insert_data(path.data(), path.size());
+ // insert value
+ data_types[i]->get_serde()->write_one_cell_to_binary(*part,
value, row);
Review Comment:
use nested serde
--
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]