From 45a7a59e8076f8634af54c1562f3eaa1c9df3ed9 Mon Sep 17 00:00:00 2001 From: Mryange Date: Thu, 14 Nov 2024 21:08:31 +0800 Subject: [PATCH] remove code --- be/src/vec/columns/column.h | 11 ----------- be/src/vec/columns/column_complex.h | 3 --- be/src/vec/columns/column_const.h | 2 -- be/src/vec/columns/column_decimal.h | 2 -- be/src/vec/columns/column_dictionary.h | 4 ---- be/src/vec/columns/column_nullable.h | 6 ------ be/src/vec/columns/column_object.h | 5 ----- be/src/vec/columns/column_vector.h | 2 -- be/src/vec/columns/predicate_column.h | 3 --- 9 files changed, 38 deletions(-) diff --git a/be/src/vec/columns/column.h b/be/src/vec/columns/column.h index d96446298d90b3..2f3ec414eb8d05 100644 --- a/be/src/vec/columns/column.h +++ b/be/src/vec/columns/column.h @@ -612,23 +612,12 @@ class IColumn : public COW { * 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; } diff --git a/be/src/vec/columns/column_complex.h b/be/src/vec/columns/column_complex.h index 1ff074b112977f..f16168e451da12 100644 --- a/be/src/vec/columns/column_complex.h +++ b/be/src/vec/columns/column_complex.h @@ -208,9 +208,6 @@ class ColumnComplexType final : public COWHelper> // 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(data.data()), data.size()); } diff --git a/be/src/vec/columns/column_const.h b/be/src/vec/columns/column_const.h index d1d9c6e047b15e..c6ab58dd19fe30 100644 --- a/be/src/vec/columns/column_const.h +++ b/be/src/vec/columns/column_const.h @@ -262,8 +262,6 @@ class ColumnConst final : public COWHelper { // 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. diff --git a/be/src/vec/columns/column_decimal.h b/be/src/vec/columns/column_decimal.h index d754831cc56a86..4c2f69d5ef3fb6 100644 --- a/be/src/vec/columns/column_decimal.h +++ b/be/src/vec/columns/column_decimal.h @@ -106,8 +106,6 @@ class ColumnDecimal final : public COWHelper> { 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]); } diff --git a/be/src/vec/columns/column_dictionary.h b/be/src/vec/columns/column_dictionary.h index 69e04973af77a1..ae7d001a31d78c 100644 --- a/be/src/vec/columns/column_dictionary.h +++ b/be/src/vec/columns/column_dictionary.h @@ -158,10 +158,6 @@ class ColumnDictionary final : public COWHelper> { __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"); diff --git a/be/src/vec/columns/column_nullable.h b/be/src/vec/columns/column_nullable.h index 35787cd52d81ff..4b80296b70c3d5 100644 --- a/be/src/vec/columns/column_nullable.h +++ b/be/src/vec/columns/column_nullable.h @@ -339,18 +339,12 @@ class ColumnNullable final : public COWHelper, 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 diff --git a/be/src/vec/columns/column_object.h b/be/src/vec/columns/column_object.h index 3379a5ff8e88e2..df509af0f8b4d1 100644 --- a/be/src/vec/columns/column_object.h +++ b/be/src/vec/columns/column_object.h @@ -537,11 +537,6 @@ class ColumnObject final : public COWHelper { 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()); } diff --git a/be/src/vec/columns/column_vector.h b/be/src/vec/columns/column_vector.h index 2676d6d344468b..2cb320b6992095 100644 --- a/be/src/vec/columns/column_vector.h +++ b/be/src/vec/columns/column_vector.h @@ -373,8 +373,6 @@ class ColumnVector final : public COWHelper> { 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(data.data()), data.size()); } diff --git a/be/src/vec/columns/predicate_column.h b/be/src/vec/columns/predicate_column.h index c9ceec230f7aec..0e36682ac15bce 100644 --- a/be/src/vec/columns/predicate_column.h +++ b/be/src/vec/columns/predicate_column.h @@ -379,9 +379,6 @@ class PredicateColumnType final : public COWHelper