Skip to content

Commit

Permalink
[fix](complex-column)fix column bitmap with agg behavior (#43228)
Browse files Browse the repository at this point in the history
  • Loading branch information
amorynan authored Nov 6, 2024
1 parent ecdc006 commit bf34be8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 9 additions & 5 deletions be/src/vec/columns/column_complex.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ColumnComplexType final : public COWHelper<IColumn, ColumnComplexType<T>>
} else if constexpr (std::is_same_v<T, QuantileStateDouble>) {
pvalue->deserialize(Slice(pos, length));
} else {
LOG(FATAL) << "Unexpected type in column complex";
throw doris::Exception(ErrorCode::INTERNAL_ERROR, "Unexpected type in column complex");
}
}

Expand Down Expand Up @@ -124,12 +124,12 @@ class ColumnComplexType final : public COWHelper<IColumn, ColumnComplexType<T>>

[[noreturn]] void get_permutation(bool reverse, size_t limit, int nan_direction_hint,
IColumn::Permutation& res) const override {
LOG(FATAL) << "get_permutation not implemented";
throw doris::Exception(ErrorCode::INTERNAL_ERROR, "get_permutation not implemented");
}

void get_indices_of_non_default_rows(IColumn::Offsets64& indices, size_t from,
size_t limit) const override {
LOG(FATAL) << "get_indices_of_non_default_rows not implemented";
throw doris::Exception(ErrorCode::INTERNAL_ERROR, "get_int not implemented");
}
[[noreturn]] ColumnPtr index(const IColumn& indexes, size_t limit) const override {
LOG(FATAL) << "index not implemented";
Expand Down Expand Up @@ -205,11 +205,15 @@ class ColumnComplexType final : public COWHelper<IColumn, ColumnComplexType<T>>
// it's impossible to use ComplexType as key , so we don't have to implement them
[[noreturn]] StringRef serialize_value_into_arena(size_t n, Arena& arena,
char const*& begin) const override {
LOG(FATAL) << "serialize_value_into_arena not implemented";
throw doris::Exception(ErrorCode::INTERNAL_ERROR,
"serialize_value_into_arena not implemented");
__builtin_unreachable();
}

[[noreturn]] const char* deserialize_and_insert_from_arena(const char* pos) override {
LOG(FATAL) << "deserialize_and_insert_from_arena not implemented";
throw doris::Exception(ErrorCode::INTERNAL_ERROR,
"deserialize_and_insert_from_arena not implemented");
__builtin_unreachable();
}

// maybe we do not need to impl the function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,8 @@ suite("test_aggregate_all_functions2") {
qt_select_minmax2 """ select max_by(datekey,hour) from metric_table; """
qt_select_minmax3 """ select bitmap_to_string(max_by(device_id,hour)) from metric_table; """
qt_select_minmax4 """ select bitmap_to_string(min_by(device_id,hour)) from metric_table; """
test {
sql "select * from (select device_id from metric_table where hour=1 minus select device_id from metric_table where hour=2 ) x;"
exception "not implemented"
}
}

0 comments on commit bf34be8

Please sign in to comment.