This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new b67596b [fix](ut) fix be ut failed (#8682)
b67596b is described below
commit b67596ba2ac34a6c79a0f4b5f969b3e5ada2667c
Author: caiconghui <[email protected]>
AuthorDate: Mon Mar 28 10:50:41 2022 +0800
[fix](ut) fix be ut failed (#8682)
---
be/src/util/quantile_state.cpp | 1 -
be/test/exprs/quantile_function_test.cpp | 2 +-
be/test/util/quantile_state_test.cpp | 5 +++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/be/src/util/quantile_state.cpp b/be/src/util/quantile_state.cpp
index a6b2cf7..4e91b40 100644
--- a/be/src/util/quantile_state.cpp
+++ b/be/src/util/quantile_state.cpp
@@ -33,7 +33,6 @@ QuantileState<T>::QuantileState(float compression) :
_type(EMPTY), _compression(
template <typename T>
QuantileState<T>::QuantileState(const Slice& slice) {
- DCHECK(deserialize(slice));
if (!deserialize(slice)) {
_type = EMPTY;
}
diff --git a/be/test/exprs/quantile_function_test.cpp
b/be/test/exprs/quantile_function_test.cpp
index 3ad6d44..46c9541 100644
--- a/be/test/exprs/quantile_function_test.cpp
+++ b/be/test/exprs/quantile_function_test.cpp
@@ -123,7 +123,7 @@ TEST_F(QuantileStateFunctionsTest, quantile_percent) {
state.add_value(5);
StringVal input = convert_quantile_state_to_string(ctx, state);
DoubleVal result = QuantileStateFunctions::quantile_percent(ctx, input);
- DoubleVal expected(2.5);
+ DoubleVal expected(3);
ASSERT_EQ(result, expected);
}
diff --git a/be/test/util/quantile_state_test.cpp
b/be/test/util/quantile_state_test.cpp
index efc8cb7..c61f555 100644
--- a/be/test/util/quantile_state_test.cpp
+++ b/be/test/util/quantile_state_test.cpp
@@ -52,3 +52,8 @@ TEST(QuantileStateTest, merge) {
}
} // namespace doris
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]