From dcaccba534f0bec42173b3af49ab9b03d5343320 Mon Sep 17 00:00:00 2001 From: Vibhatha Abeykoon Date: Fri, 24 May 2024 13:43:48 +0530 Subject: [PATCH] fix: rebase --- .../arrow/vector/TestVarCharViewVector.java | 46 ++++--------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/java/vector/src/test/java/org/apache/arrow/vector/TestVarCharViewVector.java b/java/vector/src/test/java/org/apache/arrow/vector/TestVarCharViewVector.java index 91458fa236469..17bc08c7d398c 100644 --- a/java/vector/src/test/java/org/apache/arrow/vector/TestVarCharViewVector.java +++ b/java/vector/src/test/java/org/apache/arrow/vector/TestVarCharViewVector.java @@ -47,10 +47,8 @@ import org.apache.arrow.vector.ipc.message.ArrowRecordBatch; import org.apache.arrow.vector.testing.ValueVectorDataPopulator; import org.apache.arrow.vector.types.Types; -import org.apache.arrow.vector.types.Types.MinorType; import org.apache.arrow.vector.types.pojo.Field; import org.apache.arrow.vector.types.pojo.Schema; -import org.apache.arrow.vector.types.Types.MinorType; import org.apache.arrow.vector.util.ReusableByteArray; import org.apache.arrow.vector.util.Text; import org.junit.jupiter.api.AfterEach; @@ -1462,34 +1460,6 @@ public void testSafeOverwriteLongFromALongerLongString() { } } - static Stream vectorCreatorProvider() { - return Stream.of( - Arguments.of((Function) - (allocator -> newVector(ViewVarBinaryVector.class, EMPTY_SCHEMA_PATH, - Types.MinorType.VIEWVARBINARY, allocator))), - Arguments.of((Function) - (allocator -> newVector(ViewVarCharVector.class, EMPTY_SCHEMA_PATH, - Types.MinorType.VIEWVARCHAR, allocator))) - ); - } - - BiFunction vectorCreator = (allocator, type) -> { - if (type == Types.MinorType.VIEWVARBINARY) { - return newVector(ViewVarBinaryVector.class, EMPTY_SCHEMA_PATH, Types.MinorType.VIEWVARBINARY, allocator); - } else if (type == Types.MinorType.VIEWVARCHAR) { - return newVector(ViewVarCharVector.class, EMPTY_SCHEMA_PATH, Types.MinorType.VIEWVARCHAR, allocator); - } else { - throw new UnsupportedOperationException("Not supported type : " + type); - } - }; - } - - static Stream vectorTypeAndClassProvider() { - return Stream.of( - Arguments.of(Types.MinorType.VIEWVARBINARY), - Arguments.of(Types.MinorType.VIEWVARCHAR) - ); - } @Test public void testVectorLoadUnload() { @@ -1552,12 +1522,16 @@ public void testVectorLoadUnload() { } } - @Test - public void testCopyFromWithNulls() { - try (final ViewVarCharVector vector = newVector(ViewVarCharVector.class, EMPTY_SCHEMA_PATH, - MinorType.VIEWVARCHAR, allocator); - final ViewVarCharVector vector2 = - newVector(ViewVarCharVector.class, EMPTY_SCHEMA_PATH, MinorType.VIEWVARCHAR, allocator)) { + static Stream vectorCreatorProvider() { + return Stream.of( + Arguments.of((Function) + (allocator -> newVector(ViewVarBinaryVector.class, EMPTY_SCHEMA_PATH, + Types.MinorType.VIEWVARBINARY, allocator))), + Arguments.of((Function) + (allocator -> newVector(ViewVarCharVector.class, EMPTY_SCHEMA_PATH, + Types.MinorType.VIEWVARCHAR, allocator))) + ); + } @ParameterizedTest @MethodSource({"vectorCreatorProvider"})