Skip to content

Commit 6c00731

Browse files
yjhjstzreshke
authored andcommitted
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.
1 parent f33f8ce commit 6c00731

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contrib/pax_storage/src/cpp/storage/micro_partition.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ size_t MicroPartitionReaderProxy::GetTupleCountsInGroup(size_t group_index) {
9191

9292
std::unique_ptr<ColumnStatsProvider>
9393
MicroPartitionReaderProxy::GetGroupStatsInfo(size_t group_index) {
94-
return std::move(reader_->GetGroupStatsInfo(group_index));
94+
return reader_->GetGroupStatsInfo(group_index);
9595
}
9696

9797
std::unique_ptr<MicroPartitionReader::Group>

src/backend/gporca/libgpos/include/gpos/string/CWStringConst.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class CWStringConst : public CWStringBase
5757

5858
// checks whether the string is byte-wise equal to another string
5959
BOOL Equals(const CWStringBase *str) const override;
60+
61+
// bring base class Equals(const WCHAR*) into scope to avoid hiding
62+
using CWStringBase::Equals;
6063
};
6164
} // namespace gpos
6265

0 commit comments

Comments
 (0)