eldenmoon commented on code in PR #54396:
URL: https://github.com/apache/doris/pull/54396#discussion_r2271912232
##########
be/src/vec/columns/column_variant.cpp:
##########
@@ -1664,8 +1663,10 @@ bool ColumnVariant::is_visible_root_value(size_t nrow)
const {
if (root->data.is_null_at(nrow)) {
return false;
}
- if (root->data.least_common_type.get_base_type_id() ==
PrimitiveType::TYPE_VARIANT) {
- // nested field
+
+ // for top level array we should also use field to check if it is empty
+ if (root->data.least_common_type.get_type_id() ==
PrimitiveType::TYPE_ARRAY) {
Review Comment:
why change this
##########
be/src/vec/columns/column_variant.cpp:
##########
@@ -1631,9 +1631,8 @@ struct Prefix {
bool ColumnVariant::Subcolumn::is_empty_nested(size_t row) const {
PrimitiveType base_type_id = least_common_type.get_base_type_id();
const DataTypePtr& type = least_common_type.get();
- // check if it is empty nested json array, then skip
- if (base_type_id == PrimitiveType::TYPE_VARIANT) {
- DCHECK(type->equals(*ColumnVariant::NESTED_TYPE));
+ if (type->get_primitive_type() == PrimitiveType::TYPE_ARRAY) {
Review Comment:
why change this
--
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]