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

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/main by this push:
     new 26636717445 Fix move semantics misuse and unhide Equals() overload
26636717445 is described below

commit 2663671744512a59fbc240d26d0702c4b4a9170a
Author: Jianghua Yang <yjhj...@gmail.com>
AuthorDate: Thu Aug 21 07:48:47 2025 +0800

    Fix move semantics misuse and unhide Equals() overload
    
    - In pax_storage, remove unnecessary std::move when returning a
      std::unique_ptr from GetGroupStatsInfo(). Returning directly avoids
      warnings and redundant moves.
    - In gporca/gpos, bring CWStringBase::Equals(const WCHAR*) into scope
      in CWStringConst to prevent it from being hidden by the derived class
      overload.
---
 contrib/pax_storage/src/cpp/storage/micro_partition.cc         | 2 +-
 src/backend/gporca/libgpos/include/gpos/string/CWStringConst.h | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/contrib/pax_storage/src/cpp/storage/micro_partition.cc 
b/contrib/pax_storage/src/cpp/storage/micro_partition.cc
index 57004d7d3b8..ead41b41f34 100644
--- a/contrib/pax_storage/src/cpp/storage/micro_partition.cc
+++ b/contrib/pax_storage/src/cpp/storage/micro_partition.cc
@@ -91,7 +91,7 @@ size_t 
MicroPartitionReaderProxy::GetTupleCountsInGroup(size_t group_index) {
 
 std::unique_ptr<ColumnStatsProvider>
 MicroPartitionReaderProxy::GetGroupStatsInfo(size_t group_index) {
-  return std::move(reader_->GetGroupStatsInfo(group_index));
+  return reader_->GetGroupStatsInfo(group_index);
 }
 
 std::unique_ptr<MicroPartitionReader::Group>
diff --git a/src/backend/gporca/libgpos/include/gpos/string/CWStringConst.h 
b/src/backend/gporca/libgpos/include/gpos/string/CWStringConst.h
index 448dd34e29b..96421a5b6bb 100644
--- a/src/backend/gporca/libgpos/include/gpos/string/CWStringConst.h
+++ b/src/backend/gporca/libgpos/include/gpos/string/CWStringConst.h
@@ -57,6 +57,9 @@ public:
 
        // checks whether the string is byte-wise equal to another string
        BOOL Equals(const CWStringBase *str) const override;
+
+       // bring base class Equals(const WCHAR*) into scope to avoid hiding
+       using CWStringBase::Equals;
 };
 }  // namespace gpos
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org
For additional commands, e-mail: commits-h...@cloudberry.apache.org

Reply via email to