This is an automated email from the ASF dual-hosted git repository.
reshke pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new 6c007317d0e Fix move semantics misuse and unhide Equals() overload
6c007317d0e is described below
commit 6c007317d0e708f3be450e7f5505dd45569cac7f
Author: Jianghua Yang <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]