Skip to content

Commit 5642997

Browse files
committed
update
1 parent d47ffd5 commit 5642997

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

be/src/vec/exec/format/parquet/byte_array_dict_decoder.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,11 @@ Status ByteArrayDictDecoder::_decode_values(MutableColumnPtr& doris_column, Data
140140
break;
141141
}
142142
case ColumnSelectVector::FILTERED_CONTENT: {
143-
// In lazy materialization, keep filtered rows (fill with dict data to maintain row count)
144-
std::vector<StringRef> string_values;
145-
string_values.reserve(run_length);
146-
for (size_t i = 0; i < run_length; ++i) {
147-
string_values.emplace_back(_dict_items[_indexes[dict_index++]]);
148-
}
149-
doris_column->insert_many_strings_overflow(string_values.data(), run_length,
150-
_max_value_length);
143+
dict_index += run_length;
151144
break;
152145
}
153146
case ColumnSelectVector::FILTERED_NULL: {
154-
// In lazy materialization, keep filtered null rows (fill with defaults to maintain row count)
155-
doris_column->insert_many_defaults(run_length);
147+
// do nothing
156148
break;
157149
}
158150
}

be/src/vec/exec/format/parquet/parquet_common.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,22 @@ class ColumnSelectVector {
154154

155155
_num_filtered = num_values - num_read;
156156

157-
// Fill null_map for ALL rows (including filtered ones) to maintain row count consistency
158-
if (null_map != nullptr) {
157+
if (null_map != nullptr && num_read > 0) {
159158
NullMap& map_data_column = *null_map;
160159
auto null_map_index = map_data_column.size();
161-
map_data_column.resize(null_map_index +
162-
num_values); // Resize to num_values, not num_read
163-
164-
// Fill null map for all rows based on _data_map
165-
for (i = 0; i < num_values; ++i) {
166-
if (_data_map[i] == CONTENT || _data_map[i] == FILTERED_CONTENT) {
167-
map_data_column[null_map_index++] = (UInt8) false;
168-
} else { // NULL_DATA or FILTERED_NULL
169-
map_data_column[null_map_index++] = (UInt8) true;
160+
map_data_column.resize(null_map_index + num_read);
161+
162+
if (_num_nulls == 0) {
163+
memset(map_data_column.data() + null_map_index, 0, num_read);
164+
} else if (_num_nulls == num_values) {
165+
memset(map_data_column.data() + null_map_index, 1, num_read);
166+
} else {
167+
for (i = 0; i < num_values; ++i) {
168+
if (_data_map[i] == CONTENT) {
169+
map_data_column[null_map_index++] = (UInt8) false;
170+
} else if (_data_map[i] == NULL_DATA) {
171+
map_data_column[null_map_index++] = (UInt8) true;
172+
}
170173
}
171174
}
172175
}

0 commit comments

Comments
 (0)