This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch dev-1.0.0
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit 40f34c3d7fbd12a50a033a6d38a29bf412da631a
Author: HappenLee <[email protected]>
AuthorDate: Tue Mar 8 18:58:02 2022 +0800

    [fix](vectorized) Fix the datetime type read error and is_same set error in 
reader (#8386)
---
 be/src/olap/row_block2.cpp            | 3 ++-
 be/src/vec/olap/vcollect_iterator.cpp | 9 ++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/row_block2.cpp b/be/src/olap/row_block2.cpp
index 1c078a5..5d43c94 100644
--- a/be/src/olap/row_block2.cpp
+++ b/be/src/olap/row_block2.cpp
@@ -253,7 +253,8 @@ Status RowBlockV2::_copy_data_to_column(int cid, 
doris::vectorized::MutableColum
                 auto ptr = reinterpret_cast<const 
char*>(column_block(cid).cell_ptr(row_idx));
 
                 uint64_t value = *reinterpret_cast<const uint64_t*>(ptr);
-                vectorized::VecDateTimeValue data(value);
+                vectorized::VecDateTimeValue data;
+                data.from_olap_datetime(value);
                 (column_int)->insert_data(reinterpret_cast<char*>(&data), 0);
             } else {
                 column_int->insert_default();
diff --git a/be/src/vec/olap/vcollect_iterator.cpp 
b/be/src/vec/olap/vcollect_iterator.cpp
index 8646a07..fc5d696 100644
--- a/be/src/vec/olap/vcollect_iterator.cpp
+++ b/be/src/vec/olap/vcollect_iterator.cpp
@@ -129,7 +129,14 @@ bool 
VCollectIterator::LevelIteratorComparator::operator()(LevelIterator* lhs, L
     // for UNIQUE_KEYS just read the highest version and no need agg_update.
     // for AGG_KEYS if a version is deleted, the lower version no need to 
agg_update
     bool lower = (cmp_res != 0) ? (cmp_res < 0) : (lhs->version() < 
rhs->version());
-    lower ? lhs->set_same(true) : rhs->set_same(true);
+
+    // if lhs or rhs set same is true, means some same value already output, 
so need to
+    // set another is same
+    if (lower) {
+        lhs->is_same() ? rhs->set_same(true) : lhs->set_same(true);
+    } else {
+        rhs->is_same() ? lhs->set_same(true) : rhs->set_same(true);
+    }
     return lower;
 }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to