From 13cb7292f5fcb33fa83b9c8efdf4937280dbb488 Mon Sep 17 00:00:00 2001 From: Amit Dutta Date: Sat, 25 Jan 2025 00:11:46 -0800 Subject: [PATCH] [native] Advance velox. --- .../main/tests/PrestoExchangeSourceTest.cpp | 14 +++++++++----- presto-native-execution/velox | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp b/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp index f3e54bead51a3..04ded54b62a58 100644 --- a/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp +++ b/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp @@ -424,12 +424,14 @@ std::unique_ptr waitForNextPage( const std::shared_ptr& queue) { bool atEnd; facebook::velox::ContinueFuture future; - auto pages = queue->dequeueLocked(1, &atEnd, &future); + ContinuePromise stalePromise = ContinuePromise::makeEmpty(); + auto pages = queue->dequeueLocked(0, 1, &atEnd, &future, &stalePromise); EXPECT_LE(pages.size(), 1); EXPECT_FALSE(atEnd); if (pages.empty()) { std::move(future).get(); - pages = queue->dequeueLocked(1, &atEnd, &future); + ContinuePromise stalePromise = ContinuePromise::makeEmpty(); + pages = queue->dequeueLocked(0, 1, &atEnd, &future, &stalePromise); EXPECT_EQ(pages.size(), 1); } return std::move(pages.front()); @@ -438,11 +440,13 @@ std::unique_ptr waitForNextPage( void waitForEndMarker(const std::shared_ptr& queue) { bool atEnd; facebook::velox::ContinueFuture future; - auto pages = queue->dequeueLocked(1, &atEnd, &future); + ContinuePromise stalePromise = ContinuePromise::makeEmpty(); + auto pages = queue->dequeueLocked(0, 1, &atEnd, &future, &stalePromise); ASSERT_TRUE(pages.empty()); if (!atEnd) { std::move(future).get(); - pages = queue->dequeueLocked(1, &atEnd, &future); + ContinuePromise stalePromise = ContinuePromise::makeEmpty(); + pages = queue->dequeueLocked(0, 1, &atEnd, &future, &stalePromise); ASSERT_TRUE(pages.empty()); ASSERT_TRUE(atEnd); } @@ -525,7 +529,7 @@ class PrestoExchangeSourceTest : public ::testing::TestWithParam { } std::shared_ptr makeSingleSourceQueue() { - auto queue = std::make_shared(); + auto queue = std::make_shared(1, 0); queue->addSourceLocked(); queue->noMoreSources(); return queue; diff --git a/presto-native-execution/velox b/presto-native-execution/velox index 54c6d9e966428..6010f956c3735 160000 --- a/presto-native-execution/velox +++ b/presto-native-execution/velox @@ -1 +1 @@ -Subproject commit 54c6d9e966428cf439a9c082613e575c05d75d40 +Subproject commit 6010f956c3735fdadf6a4a0d24a2e4e87f5ea9c6