You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by mi...@apache.org on 2026/10/06 00:32:21 UTC
(impala) 03/04: IMPALA-11917: Use std::move instead of unqualified move
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit 48d66cb5cbf6b5e4baa1d12415d2a3d1f882868c
Author: Michael Smith <mi...@cloudera.com>
AuthorDate: Wed Sep 30 10:27:44 2026 -0700
IMPALA-11917: Use std::move instead of unqualified move
Qualifies calls to move() as std::move() in headers so they don't rely
on argument-dependent lookup or a using declaration.
Change-Id: Id6d366200aa60af11baf05cae9364633cfd7585a
Assisted-by: Claude Sonnet 5.5 (GitHub Copilot)
Reviewed-on: http://gerrit.cloudera.org:8080/24983
Reviewed-by: Michael Smith <mi...@cloudera.com>
Tested-by: Michael Smith <mi...@cloudera.com>
---
be/src/catalog/catalog-service-client-wrapper.h | 4 ++--
be/src/codegen/codegen-symbol-emitter.h | 2 +-
be/src/exec/parquet/parquet-column-stats.inline.h | 4 ++--
be/src/exec/parquet/parquet-page-reader.h | 2 +-
be/src/exec/scanner-context.h | 4 +++-
be/src/rpc/rpc-mgr-test.h | 2 +-
be/src/rpc/sidecar-util.h | 4 ++--
be/src/runtime/krpc-data-stream-mgr.h | 8 +++----
be/src/runtime/query-driver.h | 2 +-
.../statestore/statestore-service-client-wrapper.h | 4 ++--
.../statestore-subscriber-client-wrapper.h | 4 ++--
be/src/transport/TSaslServerTransport.h | 25 ++++++++++----------
be/src/util/jwt-util-internal.h | 27 +++++++++++-----------
be/src/util/runtime-profile-counters.h | 4 ++--
14 files changed, 50 insertions(+), 46 deletions(-)
diff --git a/be/src/catalog/catalog-service-client-wrapper.h b/be/src/catalog/catalog-service-client-wrapper.h
index 6fe798b98..78af8e52c 100644
--- a/be/src/catalog/catalog-service-client-wrapper.h
+++ b/be/src/catalog/catalog-service-client-wrapper.h
@@ -25,12 +25,12 @@ namespace impala {
class CatalogServiceClientWrapper : public CatalogServiceClient {
public:
CatalogServiceClientWrapper(std::shared_ptr<::apache::thrift::protocol::TProtocol> prot)
- : CatalogServiceClient(move(prot)) {}
+ : CatalogServiceClient(std::move(prot)) {}
CatalogServiceClientWrapper(
std::shared_ptr<::apache::thrift::protocol::TProtocol> iprot,
std::shared_ptr<::apache::thrift::protocol::TProtocol> oprot)
- : CatalogServiceClient(move(iprot), move(oprot)) {}
+ : CatalogServiceClient(std::move(iprot), std::move(oprot)) {}
/// We intentionally disable this clang warning as we intend to hide the
/// the same-named functions defined in the base class.
diff --git a/be/src/codegen/codegen-symbol-emitter.h b/be/src/codegen/codegen-symbol-emitter.h
index df373c389..6cde44874 100644
--- a/be/src/codegen/codegen-symbol-emitter.h
+++ b/be/src/codegen/codegen-symbol-emitter.h
@@ -42,7 +42,7 @@ namespace impala {
class CodegenSymbolEmitter : public llvm::JITEventListener {
public:
CodegenSymbolEmitter(std::string id)
- : id_(move(id)), emit_perf_map_(false), non_freed_objects_(0) {}
+ : id_(std::move(id)), emit_perf_map_(false), non_freed_objects_(0) {}
~CodegenSymbolEmitter();
diff --git a/be/src/exec/parquet/parquet-column-stats.inline.h b/be/src/exec/parquet/parquet-column-stats.inline.h
index fc3e6d853..b4d6548c1 100644
--- a/be/src/exec/parquet/parquet-column-stats.inline.h
+++ b/be/src/exec/parquet/parquet-column-stats.inline.h
@@ -82,10 +82,10 @@ inline void ColumnStats<T>::EncodeToThrift(parquet::Statistics* out) const {
if (has_min_max_values_) {
std::string min_str;
EncodePlainValue(min_value_, BytesNeeded(min_value_), &min_str);
- out->__set_min_value(move(min_str));
+ out->__set_min_value(std::move(min_str));
std::string max_str;
EncodePlainValue(max_value_, BytesNeeded(max_value_), &max_str);
- out->__set_max_value(move(max_str));
+ out->__set_max_value(std::move(max_str));
}
out->__set_null_count(null_count_);
}
diff --git a/be/src/exec/parquet/parquet-page-reader.h b/be/src/exec/parquet/parquet-page-reader.h
index c0ccf1fad..0722393ed 100644
--- a/be/src/exec/parquet/parquet-page-reader.h
+++ b/be/src/exec/parquet/parquet-page-reader.h
@@ -32,7 +32,7 @@ class ParquetPageReader {
uint64_t PageHeadersRead() const { return page_headers_read_; }
ParquetPageReader(HdfsParquetScanner* parent, std::string schema_name)
- : parent_(parent), schema_name_(move(schema_name)) {}
+ : parent_(parent), schema_name_(std::move(schema_name)) {}
/// Resets the reader for each row group in the file and creates the scan range for the
/// column, but does not start it. To start scanning, call StartScan().
diff --git a/be/src/exec/scanner-context.h b/be/src/exec/scanner-context.h
index e589d72b5..554486771 100644
--- a/be/src/exec/scanner-context.h
+++ b/be/src/exec/scanner-context.h
@@ -137,7 +137,9 @@ class ScannerContext {
/// The callback takes the file offset of the asynchronous read (this may be more
/// than file_offset() due to data being assembled in the boundary buffer).
typedef std::function<int (int64_t)> ReadPastSizeCallback;
- void set_read_past_size_cb(ReadPastSizeCallback cb) { read_past_size_cb_ = move(cb); }
+ void set_read_past_size_cb(ReadPastSizeCallback cb) {
+ read_past_size_cb_ = std::move(cb);
+ }
/// Return the number of bytes left in the range for this stream.
int64_t bytes_left() { return scan_range_->bytes_to_read() - total_bytes_returned_; }
diff --git a/be/src/rpc/rpc-mgr-test.h b/be/src/rpc/rpc-mgr-test.h
index dacfdbe4f..d7dba942c 100644
--- a/be/src/rpc/rpc-mgr-test.h
+++ b/be/src/rpc/rpc-mgr-test.h
@@ -168,7 +168,7 @@ class RpcMgrTest : public testing::TestWithParam<bool> {
// Takes over ownership of the newly created 'service' which needs to have a lifetime
// as long as 'rpc_mgr_' as RpcMgr::Shutdown() will call Shutdown() of 'service'.
GeneratedServiceIf* TakeOverService(std::unique_ptr<GeneratedServiceIf> service) {
- services_.emplace_back(move(service));
+ services_.emplace_back(std::move(service));
return services_.back().get();
}
diff --git a/be/src/rpc/sidecar-util.h b/be/src/rpc/sidecar-util.h
index d43caca49..304090a1f 100644
--- a/be/src/rpc/sidecar-util.h
+++ b/be/src/rpc/sidecar-util.h
@@ -113,8 +113,8 @@ Status SetFaststringSidecar(const T& obj, RPC* rpc, int* sidecar_idx, int64_t* l
sidecar_str.assign_copy(serialized_buf, serialized_len);
std::unique_ptr<kudu::rpc::RpcSidecar> rpc_sidecar =
kudu::rpc::RpcSidecar::FromFaststring(std::move(sidecar_str));
- RETURN_IF_ERROR(FromKuduStatus(
- rpc->AddOutboundSidecar(move(rpc_sidecar), sidecar_idx), "Failed to add sidecar"));
+ RETURN_IF_ERROR(FromKuduStatus(rpc->AddOutboundSidecar(
+ std::move(rpc_sidecar), sidecar_idx), "Failed to add sidecar"));
*length = serialized_len;
return Status::OK();
}
diff --git a/be/src/runtime/krpc-data-stream-mgr.h b/be/src/runtime/krpc-data-stream-mgr.h
index f2738ae97..31370ce5e 100644
--- a/be/src/runtime/krpc-data-stream-mgr.h
+++ b/be/src/runtime/krpc-data-stream-mgr.h
@@ -416,14 +416,14 @@ class KrpcDataStreamMgr : public CacheLineAligned {
/// Defining the move constructor as vectors of unique_ptr are not copyable.
EarlySendersList(EarlySendersList&& other)
- : waiting_sender_ctxs(move(other.waiting_sender_ctxs)),
- closed_sender_ctxs(move(other.closed_sender_ctxs)),
+ : waiting_sender_ctxs(std::move(other.waiting_sender_ctxs)),
+ closed_sender_ctxs(std::move(other.closed_sender_ctxs)),
arrival_time(other.arrival_time) { }
/// Defining the move operator= as vectors of unique_ptr are not copyable.
EarlySendersList& operator=(EarlySendersList&& other) {
- waiting_sender_ctxs = move(other.waiting_sender_ctxs);
- closed_sender_ctxs = move(other.closed_sender_ctxs);
+ waiting_sender_ctxs = std::move(other.waiting_sender_ctxs);
+ closed_sender_ctxs = std::move(other.closed_sender_ctxs);
arrival_time = other.arrival_time;
return *this;
}
diff --git a/be/src/runtime/query-driver.h b/be/src/runtime/query-driver.h
index f6419da0b..950ac408d 100644
--- a/be/src/runtime/query-driver.h
+++ b/be/src/runtime/query-driver.h
@@ -39,7 +39,7 @@ struct QueryHandle {
/// Sets the QueryDriver and ClientRequestState for this handle.
void SetHandle(
std::shared_ptr<QueryDriver> query_driver, ClientRequestState* request_state) {
- SetQueryDriver(move(query_driver));
+ SetQueryDriver(std::move(query_driver));
SetClientRequestState(request_state);
}
diff --git a/be/src/statestore/statestore-service-client-wrapper.h b/be/src/statestore/statestore-service-client-wrapper.h
index b170d3a29..6905cf11b 100644
--- a/be/src/statestore/statestore-service-client-wrapper.h
+++ b/be/src/statestore/statestore-service-client-wrapper.h
@@ -27,12 +27,12 @@ class StatestoreServiceClientWrapper : public StatestoreServiceClient {
public:
StatestoreServiceClientWrapper(
std::shared_ptr<::apache::thrift::protocol::TProtocol> prot)
- : StatestoreServiceClient(move(prot)) {}
+ : StatestoreServiceClient(std::move(prot)) {}
StatestoreServiceClientWrapper(
std::shared_ptr<::apache::thrift::protocol::TProtocol> iprot,
std::shared_ptr<::apache::thrift::protocol::TProtocol> oprot)
- : StatestoreServiceClient(move(iprot), move(oprot)) {}
+ : StatestoreServiceClient(std::move(iprot), std::move(oprot)) {}
/// We intentionally disable this clang warning as we intend to hide the
/// the same-named functions defined in the base class.
diff --git a/be/src/statestore/statestore-subscriber-client-wrapper.h b/be/src/statestore/statestore-subscriber-client-wrapper.h
index d6ca57094..aa073dd9e 100644
--- a/be/src/statestore/statestore-subscriber-client-wrapper.h
+++ b/be/src/statestore/statestore-subscriber-client-wrapper.h
@@ -26,12 +26,12 @@ class StatestoreSubscriberClientWrapper : public StatestoreSubscriberClient {
public:
StatestoreSubscriberClientWrapper(
std::shared_ptr<::apache::thrift::protocol::TProtocol> prot)
- : StatestoreSubscriberClient(move(prot)) {}
+ : StatestoreSubscriberClient(std::move(prot)) {}
StatestoreSubscriberClientWrapper(
std::shared_ptr<::apache::thrift::protocol::TProtocol> iprot,
std::shared_ptr<::apache::thrift::protocol::TProtocol> oprot)
- : StatestoreSubscriberClient(move(iprot), move(oprot)) {}
+ : StatestoreSubscriberClient(std::move(iprot), std::move(oprot)) {}
/// We intentionally disable this clang warning as we intend to hide the
/// the same-named functions defined in the base class.
diff --git a/be/src/transport/TSaslServerTransport.h b/be/src/transport/TSaslServerTransport.h
index 47966d9af..040cfa3da 100644
--- a/be/src/transport/TSaslServerTransport.h
+++ b/be/src/transport/TSaslServerTransport.h
@@ -84,13 +84,13 @@ class TSaslServerTransport : public TSaslTransport {
std::string serverName, std::string realm,
unsigned flags, std::map<std::string, std::string> props,
std::vector<struct sasl_callback> callbacks)
- : mechanism_(move(mechanism)),
- protocol_(move(protocol)),
- serverName_(move(serverName)),
- realm_(move(realm)),
+ : mechanism_(std::move(mechanism)),
+ protocol_(std::move(protocol)),
+ serverName_(std::move(serverName)),
+ realm_(std::move(realm)),
flags_(flags),
- props_(move(props)),
- callbacks_(move(callbacks)) {
+ props_(std::move(props)),
+ callbacks_(std::move(callbacks)) {
}
};
@@ -113,10 +113,11 @@ class TSaslServerTransport : public TSaslTransport {
std::vector<struct sasl_callback> callbacks) {
// Make a copy because expression evaluation order is not guaranteed.
std::string mechanism_key = mechanism;
- serverDefinitionMap_.insert(std::pair<std::string,
- TSaslServerDefinition*>(move(mechanism_key),
- new TSaslServerDefinition(move(mechanism), move(protocol), move(serverName),
- move(realm), flags, move(props), move(callbacks))));
+ serverDefinitionMap_.insert(std::pair<std::string, TSaslServerDefinition*>(
+ std::move(mechanism_key),
+ new TSaslServerDefinition(
+ std::move(mechanism), std::move(protocol), std::move(serverName),
+ std::move(realm), flags, std::move(props), std::move(callbacks))));
}
/* Set the server */
@@ -140,7 +141,7 @@ class TSaslServerTransport : public TSaslTransport {
std::vector<struct sasl_callback> callbacks)
: TTransportFactory() {
addServerDefinition(mechanism, protocol, serverName, realm, flags,
- move(props), move(callbacks));
+ std::move(props), std::move(callbacks));
}
virtual ~Factory() {}
@@ -162,7 +163,7 @@ class TSaslServerTransport : public TSaslTransport {
serverDefinitionMap_.insert(
std::pair<std::string, TSaslServerDefinition*>(mechanism,
new TSaslServerDefinition(mechanism, protocol,
- serverName, realm, flags, move(props), move(callbacks))));
+ serverName, realm, flags, std::move(props), std::move(callbacks))));
}
private:
/* Map for holding and returning server definitions. */
diff --git a/be/src/util/jwt-util-internal.h b/be/src/util/jwt-util-internal.h
index 8d5a78a17..b76735253 100644
--- a/be/src/util/jwt-util-internal.h
+++ b/be/src/util/jwt-util-internal.h
@@ -53,7 +53,8 @@ class JsonWebKeySet;
class JWTPublicKey {
public:
JWTPublicKey(std::string algorithm, std::string pub_key)
- : verifier_(jwt::verify()), algorithm_(move(algorithm)), public_key_(move(pub_key)) {}
+ : verifier_(jwt::verify()), algorithm_(std::move(algorithm)),
+ public_key_(std::move(pub_key)) {}
/// Verify the given decoded token.
Status Verify(const DecodedJWT& decoded_jwt, const std::string& algorithm) const;
@@ -83,7 +84,7 @@ class HS256JWTPublicKey : public JWTPublicKey {
public:
/// Throw JWT exception if failed to initialize the verifier.
HS256JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::hs256(get_key()));
}
};
@@ -94,7 +95,7 @@ class HS384JWTPublicKey : public JWTPublicKey {
public:
/// Throw exception if failed to initialize the JWT verifier.
HS384JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::hs384(get_key()));
}
};
@@ -105,7 +106,7 @@ class HS512JWTPublicKey : public JWTPublicKey {
public:
/// Throw JWT exception if failed to initialize the verifier.
HS512JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::hs512(get_key()));
}
};
@@ -116,7 +117,7 @@ class RS256JWTPublicKey : public JWTPublicKey {
public:
/// Throw JWT exception if failed to initialize the verifier.
RS256JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::rs256(get_key(), "", "", ""));
}
};
@@ -127,7 +128,7 @@ class RS384JWTPublicKey : public JWTPublicKey {
public:
/// Throw exception if failed to initialize the JWT verifier.
RS384JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::rs384(get_key(), "", "", ""));
}
};
@@ -138,7 +139,7 @@ class RS512JWTPublicKey : public JWTPublicKey {
public:
/// Throw JWT exception if failed to initialize the verifier.
RS512JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::rs512(get_key(), "", "", ""));
}
};
@@ -150,7 +151,7 @@ class PS256JWTPublicKey : public JWTPublicKey {
public:
/// Throw JWT exception if failed to initialize the verifier.
PS256JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::ps256(get_key(), "", "", ""));
}
};
@@ -161,7 +162,7 @@ class PS384JWTPublicKey : public JWTPublicKey {
public:
/// Throw exception if failed to initialize the JWT verifier.
PS384JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::ps384(get_key(), "", "", ""));
}
};
@@ -172,7 +173,7 @@ class PS512JWTPublicKey : public JWTPublicKey {
public:
/// Throw JWT exception if failed to initialize the verifier.
PS512JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::ps512(get_key(), "", "", ""));
}
};
@@ -183,7 +184,7 @@ class ES256JWTPublicKey : public JWTPublicKey {
public:
/// Throw JWT exception if failed to initialize the verifier.
ES256JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::es256(get_key(), "", "", ""));
}
};
@@ -194,7 +195,7 @@ class ES384JWTPublicKey : public JWTPublicKey {
public:
/// Throw exception if failed to initialize the JWT verifier.
ES384JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::es384(get_key(), "", "", ""));
}
};
@@ -205,7 +206,7 @@ class ES512JWTPublicKey : public JWTPublicKey {
public:
/// Throw JWT exception if failed to initialize the verifier.
ES512JWTPublicKey(std::string algorithm, std::string pub_key)
- : JWTPublicKey(move(algorithm), move(pub_key)) {
+ : JWTPublicKey(std::move(algorithm), std::move(pub_key)) {
verifier_.allow_algorithm(jwt::algorithm::es512(get_key(), "", "", ""));
}
};
diff --git a/be/src/util/runtime-profile-counters.h b/be/src/util/runtime-profile-counters.h
index 733ac61e6..8e7d80d0e 100644
--- a/be/src/util/runtime-profile-counters.h
+++ b/be/src/util/runtime-profile-counters.h
@@ -673,9 +673,9 @@ class RuntimeProfile::EventSequence {
/// Stores an event in sequence with the given label and the current time
/// (relative to the first time Start() was called) as the timestamp.
int64_t MarkEvent(std::string label) {
- Event event = make_pair(move(label), sw_.ElapsedTime() + offset_);
+ Event event = make_pair(std::move(label), sw_.ElapsedTime() + offset_);
std::lock_guard<SpinLock> event_lock(lock_);
- events_.emplace_back(move(event));
+ events_.emplace_back(std::move(event));
return event.second;
}