Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonLiTree committed Oct 31, 2023
1 parent e04ccb4 commit a732c29
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions be/src/runtime/define_primitive_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions be/src/runtime/geometry_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>(from_geometry_string(s.c_str(), s.length())); }
GeometryBinaryValue(const char* ptr, size_t len) { static_cast<void>(from_geometry_string(ptr, len)); }

~GeometryBinaryValue() { delete[] ptr; }

Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ enum class TypeIndex {
Decimal256 = 45,
IPv4 = 46,
IPv6 = 47,
GEOMETRY = 48
GEOMETRY = 48,
Int256
};

Expand Down
4 changes: 3 additions & 1 deletion be/src/vec/data_types/data_type_geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions be/src/vec/sink/vtablet_block_convertor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ Status OlapTableBlockConvertor::_validate_column(RuntimeState* state, const Type
case TYPE_GEOMETRY: {
const auto column_string =
assert_cast<const vectorized::ColumnString*>(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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ public void toThrift(TTypeDesc container) {
case STRING:
case JSONB:
case VARIANT:
case GEOMETRY:{
case GEOMETRY: {
scalarType.setLen(getLength());
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit a732c29

Please sign in to comment.