Skip to content

Commit 7b23e37

Browse files
committed
C++20
1 parent 9935d43 commit 7b23e37

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

presto-native-execution/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ execute_process(
2424
OUTPUT_VARIABLE SCRIPT_CXX_FLAGS
2525
RESULT_VARIABLE COMMAND_STATUS)
2626

27-
set(CMAKE_CXX_STANDARD 17)
27+
set(CMAKE_CXX_STANDARD 20)
2828
set(CMAKE_CXX_STANDARD_REQUIRED True)
2929
message("Appending CMAKE_CXX_FLAGS with ${SCRIPT_CXX_FLAGS}")
3030
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SCRIPT_CXX_FLAGS}")

presto-native-execution/presto_cpp/main/http/HttpClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ folly::SemiFuture<std::unique_ptr<HttpResponse>> HttpClient::sendRequest(
542542
if (eventBase_ != nullptr) {
543543
if (delayMs > 0) {
544544
// schedule() is expected to be run in the event base thread
545-
eventBase_->runInEventBaseThread([=]() {
545+
eventBase_->runInEventBaseThread([=, this]() {
546546
eventBase_->schedule(sendCb, std::chrono::milliseconds(delayMs));
547547
});
548548
} else {

presto-native-execution/presto_cpp/main/types/tests/FunctionMetadataTest.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,15 @@ class FunctionMetadataTest : public ::testing::Test {
4848
EXPECT_EQ(metadataList.size(), expectedSize);
4949
std::string expectedStr = slurp(test::utils::getDataPath(expectedFile));
5050
auto expected = json::parse(expectedStr);
51+
auto comparator = [](const json& a, const json& b) {
52+
return (a["outputType"] < b["outputType"]);
53+
};
5154

5255
json::array_t expectedList = expected[name];
53-
std::sort(expectedList.begin(), expectedList.end());
54-
std::sort(metadataList.begin(), metadataList.end());
56+
std::sort(expectedList.begin(), expectedList.end(), comparator);
57+
std::sort(metadataList.begin(), metadataList.end(), comparator);
5558
for (auto i = 0; i < expectedSize; i++) {
56-
EXPECT_EQ(expectedList[i], metadataList[i]);
59+
EXPECT_EQ(expectedList[i], metadataList[i]) << "Position: " << i;
5760
}
5861
}
5962

0 commit comments

Comments
 (0)