This is an automated email from the ASF dual-hosted git repository.

marong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new a3dff0491  [VL] Add unknown type to shuffle cpp ut (#5973)
a3dff0491 is described below

commit a3dff0491b9beb489a03efe6f4ac566ed003300e
Author: Rong Ma <[email protected]>
AuthorDate: Wed Jun 5 17:28:40 2024 +0800

     [VL] Add unknown type to shuffle cpp ut (#5973)
---
 cpp/velox/tests/VeloxShuffleWriterTest.cc          | 10 ++++------
 cpp/velox/utils/tests/VeloxShuffleWriterTestBase.h |  5 +++--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/cpp/velox/tests/VeloxShuffleWriterTest.cc 
b/cpp/velox/tests/VeloxShuffleWriterTest.cc
index 52649128a..1c1be6fc1 100644
--- a/cpp/velox/tests/VeloxShuffleWriterTest.cc
+++ b/cpp/velox/tests/VeloxShuffleWriterTest.cc
@@ -375,6 +375,9 @@ TEST_P(RoundRobinPartitioningShuffleWriter, 
preAllocForceRealloc) {
 }
 
 TEST_P(RoundRobinPartitioningShuffleWriter, preAllocForceReuse) {
+  if (GetParam().shuffleWriterType == kSortShuffle) {
+    return;
+  }
   ASSERT_NOT_OK(initShuffleWriterOptions());
   shuffleWriterOptions_.bufferReallocThreshold = 1; // Force re-alloc on 
buffer size changed.
   auto shuffleWriter = createShuffleWriter(defaultArrowMemoryPool().get());
@@ -440,12 +443,7 @@ TEST_P(RoundRobinPartitioningShuffleWriter, 
spillVerifyResult) {
   auto blockPid2 = takeRows({inputVector1_}, {{1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 
1, 3, 5, 7, 9}});
 
   // Stop and verify.
-  shuffleWriteReadMultiBlocks(
-      *shuffleWriter,
-      2,
-      inputVector1_->type(),
-      //      {{block1Pid1, block1Pid1, block1Pid1}, {block1Pid2, block1Pid2, 
block1Pid2}});
-      {{blockPid1}, {blockPid2}});
+  shuffleWriteReadMultiBlocks(*shuffleWriter, 2, inputVector1_->type(), 
{{blockPid1}, {blockPid2}});
 }
 
 TEST_F(VeloxShuffleWriterMemoryTest, memoryLeak) {
diff --git a/cpp/velox/utils/tests/VeloxShuffleWriterTestBase.h 
b/cpp/velox/utils/tests/VeloxShuffleWriterTestBase.h
index 94e2b071b..fd3ae3d54 100644
--- a/cpp/velox/utils/tests/VeloxShuffleWriterTestBase.h
+++ b/cpp/velox/utils/tests/VeloxShuffleWriterTestBase.h
@@ -26,6 +26,7 @@
 #include "shuffle/PartitionWriter.h"
 #include "shuffle/VeloxShuffleReader.h"
 #include "utils/Compression.h"
+#include "velox/type/Type.h"
 #include "velox/vector/tests/VectorTestUtils.h"
 
 namespace gluten {
@@ -119,7 +120,7 @@ class VeloxShuffleWriterTestBase : public 
facebook::velox::test::VectorTestBase
             {"alice0", "bob1", "alice2", "bob3", "Alice4", "Bob5", "AlicE6", 
"boB7", "ALICE8", "BOB9"}),
         makeNullableFlatVector<facebook::velox::StringView>(
             {"alice", "bob", std::nullopt, std::nullopt, "Alice", "Bob", 
std::nullopt, "alicE", std::nullopt, "boB"}),
-    };
+        facebook::velox::BaseVector::create(facebook::velox::UNKNOWN(), 10, 
pool())};
 
     children2_ = {
         makeNullableFlatVector<int8_t>({std::nullopt, std::nullopt}),
@@ -132,7 +133,7 @@ class VeloxShuffleWriterTestBase : public 
facebook::velox::test::VectorTestBase
             {"bob",
              
"alicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealicealice"}),
         makeNullableFlatVector<facebook::velox::StringView>({std::nullopt, 
std::nullopt}),
-    };
+        facebook::velox::BaseVector::create(facebook::velox::UNKNOWN(), 2, 
pool())};
 
     childrenNoNull_ = {
         makeFlatVector<int8_t>({0, 1}),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to