diff --git a/be/src/runtime/define_primitive_type.h b/be/src/runtime/define_primitive_type.h index bd5f53ee38870c..539d88fd7446d2 100644 --- a/be/src/runtime/define_primitive_type.h +++ b/be/src/runtime/define_primitive_type.h @@ -65,8 +65,8 @@ enum PrimitiveType : PrimitiveNative { TYPE_AGG_STATE, /* 34 */ TYPE_DECIMAL256, /* 35 */ TYPE_IPV4, /* 36 */ - TYPE_IPV6 /* 37 */ - TYPE_GEOMETRY, /* 38 */ + TYPE_IPV6, /* 37 */ + TYPE_GEOMETRY /* 38 */ }; constexpr PrimitiveNative BEGIN_OF_PRIMITIVE_TYPE = INVALID_TYPE; diff --git a/be/src/runtime/geometry_value.h b/be/src/runtime/geometry_value.h index b09f1a8e7a26de..88e2779b0682e3 100644 --- a/be/src/runtime/geometry_value.h +++ b/be/src/runtime/geometry_value.h @@ -28,8 +28,8 @@ struct GeometryBinaryValue { std::stringstream result_stream; GeometryBinaryValue() : ptr(nullptr), len(0) {} - GeometryBinaryValue(const std::string& s) { from_geometry_string(s.c_str(), s.length()); } - GeometryBinaryValue(const char* ptr, size_t len) { from_geometry_string(ptr, len); } + GeometryBinaryValue(const std::string& s) { static_cast(from_geometry_string(s.c_str(), s.length())); } + GeometryBinaryValue(const char* ptr, size_t len) { static_cast(from_geometry_string(ptr, len)); } ~GeometryBinaryValue() { delete[] ptr; } diff --git a/be/src/vec/core/types.h b/be/src/vec/core/types.h index f7f8cac96fc420..3cd11e15827d35 100644 --- a/be/src/vec/core/types.h +++ b/be/src/vec/core/types.h @@ -101,7 +101,7 @@ enum class TypeIndex { Decimal256 = 45, IPv4 = 46, IPv6 = 47, - GEOMETRY = 48 + GEOMETRY = 48, Int256 }; diff --git a/be/src/vec/data_types/data_type_geometry.h b/be/src/vec/data_types/data_type_geometry.h index a86d16322b7f0b..3d8a67c3ccb85f 100644 --- a/be/src/vec/data_types/data_type_geometry.h +++ b/be/src/vec/data_types/data_type_geometry.h @@ -34,7 +34,9 @@ class DataTypeGeometry final : public IDataType { const char* get_family_name() const override { return "GEOMETRY"; } TypeIndex get_type_id() const override { return TypeIndex::GEOMETRY; } - PrimitiveType get_type_as_primitive_type() const override { return TYPE_GEOMETRY; } + TypeDescriptor get_type_as_type_descriptor() const override { + return TypeDescriptor(TYPE_GEOMETRY); + } TPrimitiveType::type get_type_as_tprimitive_type() const override { return TPrimitiveType::GEOMETRY; } diff --git a/be/src/vec/sink/vtablet_block_convertor.cpp b/be/src/vec/sink/vtablet_block_convertor.cpp index a4183648a69a20..722ffcb2f2b09c 100644 --- a/be/src/vec/sink/vtablet_block_convertor.cpp +++ b/be/src/vec/sink/vtablet_block_convertor.cpp @@ -399,8 +399,8 @@ Status OlapTableBlockConvertor::_validate_column(RuntimeState* state, const Type case TYPE_GEOMETRY: { const auto column_string = assert_cast(real_column_ptr.get()); - for (size_t j = 0; j < column->size(); ++j) { - if (!_filter_bitmap.Get(j)) { + for (size_t j = 0; j < row_count; ++j) { + if (!_filter_map[j]) { if (is_nullable && column_ptr && column_ptr->is_null_at(j)) { continue; } diff --git a/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java b/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java index 7a2eb8e8a11a0a..7e05669420555b 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java +++ b/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java @@ -719,7 +719,7 @@ public void toThrift(TTypeDesc container) { case STRING: case JSONB: case VARIANT: - case GEOMETRY:{ + case GEOMETRY: { scalarType.setLen(getLength()); break; } diff --git a/fe/fe-common/src/main/java/org/apache/doris/catalog/Type.java b/fe/fe-common/src/main/java/org/apache/doris/catalog/Type.java index 411ecead359590..06c4dff45bcf32 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/catalog/Type.java +++ b/fe/fe-common/src/main/java/org/apache/doris/catalog/Type.java @@ -1937,7 +1937,8 @@ public Integer getNumPrecRadix() { || t1 == PrimitiveType.VARIANT || t2 == PrimitiveType.VARIANT || t1 == PrimitiveType.LAMBDA_FUNCTION || t2 == PrimitiveType.LAMBDA_FUNCTION || t1 == PrimitiveType.IPV4 || t2 == PrimitiveType.IPV4 - || t1 == PrimitiveType.IPV6 || t2 == PrimitiveType.IPV6) { + || t1 == PrimitiveType.IPV6 || t2 == PrimitiveType.IPV6 + || t1 == PrimitiveType.GEOMETRY || t2 == PrimitiveType.GEOMETRY) { continue; } Preconditions.checkNotNull(compatibilityMatrix[i][j]);