You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by pa...@apache.org on 2022/07/18 11:21:08 UTC
[doris] branch master updated: [Chore][Compile] fix compile fail on clang (#10837)
This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new afc1d0c05c [Chore][Compile] fix compile fail on clang (#10837)
afc1d0c05c is described below
commit afc1d0c05c0890d9838e9179fb4a0b9e4d33a36c
Author: Pxl <95...@qq.com>
AuthorDate: Mon Jul 18 19:21:01 2022 +0800
[Chore][Compile] fix compile fail on clang (#10837)
fix compile fail on clang because of output int128
---
.gitignore | 1 +
be/src/exec/olap_common.h | 11 ++++-------
be/src/vec/columns/column_nullable.h | 5 +++--
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/.gitignore b/.gitignore
index a10326bc75..c8cf1a765b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,6 +55,7 @@ fs_brokers/apache_hdfs_broker/src/main/thrift/
# regression-test
regression-test/framework/dependency-reduced-pom.xml
+regression-test/realdata/*
samples/doris-demo/remote-udf-python-demo/*_pb2.py
samples/doris-demo/remote-udf-python-demo/*_pb2_grpc.py
diff --git a/be/src/exec/olap_common.h b/be/src/exec/olap_common.h
index abb856cef3..d2aed8db68 100644
--- a/be/src/exec/olap_common.h
+++ b/be/src/exec/olap_common.h
@@ -50,9 +50,7 @@ std::string cast_to_string(T value, int scale) {
} else if constexpr (primitive_type == TYPE_TINYINT) {
return std::to_string(static_cast<int>(value));
} else if constexpr (primitive_type == TYPE_LARGEINT) {
- std::stringstream ss;
- ss << value;
- return ss.str();
+ return vectorized::int128_to_string(value);
} else {
return boost::lexical_cast<std::string>(value);
}
@@ -303,7 +301,7 @@ public:
Status get_key_range(std::vector<std::unique_ptr<OlapScanRange>>* key_range);
- bool has_range_value() { return _has_range_value; }
+ bool has_range_value() const { return _has_range_value; }
void clear() {
_has_range_value = false;
@@ -354,15 +352,14 @@ private:
bool _is_convertible;
};
-typedef std::variant<
+using ColumnValueRangeType = std::variant<
ColumnValueRange<TYPE_TINYINT>, ColumnValueRange<TYPE_SMALLINT>, ColumnValueRange<TYPE_INT>,
ColumnValueRange<TYPE_BIGINT>, ColumnValueRange<TYPE_LARGEINT>, ColumnValueRange<TYPE_CHAR>,
ColumnValueRange<TYPE_VARCHAR>, ColumnValueRange<TYPE_STRING>, ColumnValueRange<TYPE_DATE>,
ColumnValueRange<TYPE_DATEV2>, ColumnValueRange<TYPE_DATETIME>,
ColumnValueRange<TYPE_DECIMALV2>, ColumnValueRange<TYPE_BOOLEAN>,
ColumnValueRange<TYPE_HLL>, ColumnValueRange<TYPE_DECIMAL32>,
- ColumnValueRange<TYPE_DECIMAL64>, ColumnValueRange<TYPE_DECIMAL128>>
- ColumnValueRangeType;
+ ColumnValueRange<TYPE_DECIMAL64>, ColumnValueRange<TYPE_DECIMAL128>>;
template <PrimitiveType primitive_type>
const typename ColumnValueRange<primitive_type>::CppType
diff --git a/be/src/vec/columns/column_nullable.h b/be/src/vec/columns/column_nullable.h
index ef26802f0e..3e342eeac1 100644
--- a/be/src/vec/columns/column_nullable.h
+++ b/be/src/vec/columns/column_nullable.h
@@ -77,7 +77,7 @@ public:
Field operator[](size_t n) const override;
void get(size_t n, Field& res) const override;
bool get_bool(size_t n) const override {
- return is_null_at(n) ? 0 : nested_column->get_bool(n);
+ return is_null_at(n) ? false : nested_column->get_bool(n);
}
UInt64 get64(size_t n) const override { return nested_column->get64(n); }
StringRef get_data_at(size_t n) const override;
@@ -165,8 +165,9 @@ public:
}
bool structure_equals(const IColumn& rhs) const override {
- if (auto rhs_nullable = typeid_cast<const ColumnNullable*>(&rhs))
+ if (auto rhs_nullable = typeid_cast<const ColumnNullable*>(&rhs)) {
return nested_column->structure_equals(*rhs_nullable->nested_column);
+ }
return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org