Skip to content

Commit

Permalink
remove code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mryange committed Nov 18, 2024
1 parent 2274fba commit 45a7a59
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 38 deletions.
11 changes: 0 additions & 11 deletions be/src/vec/columns/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -612,23 +612,12 @@ class IColumn : public COW<IColumn> {
* To avoid confusion between these cases, we don't have isContiguous method.
*/

/// Values in column are represented as continuous memory segment of fixed size. Implies values_have_fixed_size.
virtual bool is_fixed_and_contiguous() const { return false; }

/// If is_fixed_and_contiguous, returns the underlying data array, otherwise throws an exception.
virtual StringRef get_raw_data() const {
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
"Column {} is not a contiguous block of memory", get_name());
return StringRef {};
}

/// If values_have_fixed_size, returns size of value, otherwise throw an exception.
virtual size_t size_of_value_if_fixed() const {
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
"Values of column {} are not fixed size.", get_name());
return 0;
}

/// Returns ratio of values in column, that are equal to default value of column.
/// Checks only @sample_ratio ratio of rows.
virtual double get_ratio_of_default_rows(double sample_ratio = 1.0) const { return 0.0; }
Expand Down
3 changes: 0 additions & 3 deletions be/src/vec/columns/column_complex.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ class ColumnComplexType final : public COWHelper<IColumn, ColumnComplexType<T>>
// TODO add hash function
}

bool is_fixed_and_contiguous() const override { return true; }
size_t size_of_value_if_fixed() const override { return sizeof(T); }

StringRef get_raw_data() const override {
return StringRef(reinterpret_cast<const char*>(data.data()), data.size());
}
Expand Down
2 changes: 0 additions & 2 deletions be/src/vec/columns/column_const.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ class ColumnConst final : public COWHelper<IColumn, ColumnConst> {
// bool is_nullable() const override { return is_column_nullable(*data); }
bool only_null() const override { return data->is_null_at(0); }
bool is_numeric() const override { return data->is_numeric(); }
bool is_fixed_and_contiguous() const override { return data->is_fixed_and_contiguous(); }
size_t size_of_value_if_fixed() const override { return data->size_of_value_if_fixed(); }
StringRef get_raw_data() const override { return data->get_raw_data(); }

/// Not part of the common interface.
Expand Down
2 changes: 0 additions & 2 deletions be/src/vec/columns/column_decimal.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ class ColumnDecimal final : public COWHelper<IColumn, ColumnDecimal<T>> {

bool is_numeric() const override { return false; }
bool is_column_decimal() const override { return true; }
bool is_fixed_and_contiguous() const override { return true; }
size_t size_of_value_if_fixed() const override { return sizeof(T); }

size_t size() const override { return data.size(); }
size_t byte_size() const override { return data.size() * sizeof(data[0]); }
Expand Down
4 changes: 0 additions & 4 deletions be/src/vec/columns/column_dictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ class ColumnDictionary final : public COWHelper<IColumn, ColumnDictionary<T>> {
__builtin_unreachable();
}

bool is_fixed_and_contiguous() const override { return true; }

size_t size_of_value_if_fixed() const override { return sizeof(T); }

[[noreturn]] StringRef get_raw_data() const override {
throw doris::Exception(ErrorCode::INTERNAL_ERROR,
"get_raw_data not supported in ColumnDictionary");
Expand Down
6 changes: 0 additions & 6 deletions be/src/vec/columns/column_nullable.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,18 +339,12 @@ class ColumnNullable final : public COWHelper<IColumn, ColumnNullable>, public N
bool is_column_array() const override { return get_nested_column().is_column_array(); }
bool is_column_map() const override { return get_nested_column().is_column_map(); }
bool is_column_struct() const override { return get_nested_column().is_column_struct(); }
bool is_fixed_and_contiguous() const override { return false; }

bool is_exclusive() const override {
return IColumn::is_exclusive() && nested_column->is_exclusive() &&
get_null_map_column().is_exclusive();
}

size_t size_of_value_if_fixed() const override {
return get_null_map_column().size_of_value_if_fixed() +
nested_column->size_of_value_if_fixed();
}

bool only_null() const override { return size() == 1 && is_null_at(0); }

// used in schema change
Expand Down
5 changes: 0 additions & 5 deletions be/src/vec/columns/column_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,6 @@ class ColumnObject final : public COWHelper<IColumn, ColumnObject> {
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "get_raw_data" + get_name());
}

size_t size_of_value_if_fixed() const override {
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
"size_of_value_if_fixed" + get_name());
}

StringRef get_data_at(size_t) const override {
throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "get_data_at" + get_name());
}
Expand Down
2 changes: 0 additions & 2 deletions be/src/vec/columns/column_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,6 @@ class ColumnVector final : public COWHelper<IColumn, ColumnVector<T>> {

ColumnPtr replicate(const IColumn::Offsets& offsets) const override;

bool is_fixed_and_contiguous() const override { return true; }
size_t size_of_value_if_fixed() const override { return sizeof(T); }
StringRef get_raw_data() const override {
return StringRef(reinterpret_cast<const char*>(data.data()), data.size());
}
Expand Down
3 changes: 0 additions & 3 deletions be/src/vec/columns/predicate_column.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,6 @@ class PredicateColumnType final : public COWHelper<IColumn, PredicateColumnType<
__builtin_unreachable();
}

bool is_fixed_and_contiguous() const override { return true; }
size_t size_of_value_if_fixed() const override { return sizeof(T); }

[[noreturn]] StringRef get_raw_data() const override {
throw doris::Exception(ErrorCode::INTERNAL_ERROR,
"get_raw_data not supported in PredicateColumnType");
Expand Down

0 comments on commit 45a7a59

Please sign in to comment.