[fix](build) fix compile fail on Segment::open (#14058)

This commit is contained in:
Pxl
2022-11-08 14:38:40 +08:00
committed by GitHub
parent f7ecb6d79f
commit df89e46761
2 changed files with 12 additions and 12 deletions

View File

@ -402,10 +402,10 @@ private:
auto* nested_col_ptr = vectorized::check_and_get_column<
vectorized::ColumnDictionary<vectorized::Int32>>(column);
auto& data_array = nested_col_ptr->get_data();
auto& _value_in_dict_flags =
auto& value_in_dict_flags =
_segment_id_to_value_in_dict_flags[column->get_rowset_segment_id()];
if (_value_in_dict_flags.empty()) {
nested_col_ptr->find_codes(_values, _value_in_dict_flags);
if (value_in_dict_flags.empty()) {
nested_col_ptr->find_codes(_values, value_in_dict_flags);
}
for (uint16_t i = 0; i < size; i++) {
@ -420,11 +420,11 @@ private:
}
if constexpr (is_opposite != (PT == PredicateType::IN_LIST)) {
if (_value_in_dict_flags[data_array[idx]]) {
if (value_in_dict_flags[data_array[idx]]) {
sel[new_size++] = idx;
}
} else {
if (!_value_in_dict_flags[data_array[idx]]) {
if (!value_in_dict_flags[data_array[idx]]) {
sel[new_size++] = idx;
}
}
@ -475,10 +475,10 @@ private:
auto* nested_col_ptr = vectorized::check_and_get_column<
vectorized::ColumnDictionary<vectorized::Int32>>(column);
auto& data_array = nested_col_ptr->get_data();
auto& _value_in_dict_flags =
auto& value_in_dict_flags =
_segment_id_to_value_in_dict_flags[column->get_rowset_segment_id()];
if (_value_in_dict_flags.empty()) {
nested_col_ptr->find_codes(_values, _value_in_dict_flags);
if (value_in_dict_flags.empty()) {
nested_col_ptr->find_codes(_values, value_in_dict_flags);
}
for (uint16_t i = 0; i < size; i++) {
@ -497,11 +497,11 @@ private:
}
if constexpr (is_opposite != (PT == PredicateType::IN_LIST)) {
if (is_and ^ _value_in_dict_flags[data_array[idx]]) {
if (is_and ^ value_in_dict_flags[data_array[idx]]) {
flags[i] = !is_and;
}
} else {
if (is_and ^ !_value_in_dict_flags[data_array[idx]]) {
if (is_and ^ !value_in_dict_flags[data_array[idx]]) {
flags[i] = !is_and;
}
}

View File

@ -389,8 +389,8 @@ Status BetaRowsetWriter::_load_noncompacted_segments(
auto cache_path =
BetaRowset::segment_cache_path(_context.rowset_dir, _context.rowset_id, seg_id);
std::shared_ptr<segment_v2::Segment> segment;
auto s = segment_v2::Segment::open(fs, seg_path, cache_path, seg_id, _context.tablet_schema,
&segment);
auto s = segment_v2::Segment::open(fs, seg_path, cache_path, seg_id, rowset_id(),
_context.tablet_schema, &segment);
if (!s.ok()) {
LOG(WARNING) << "failed to open segment. " << seg_path << ":" << s.to_string();
return Status::OLAPInternalError(OLAP_ERR_ROWSET_LOAD_FAILED);