vibhatha commented on code in PR #41752:
URL: https://github.com/apache/arrow/pull/41752#discussion_r1613022956
##########
java/vector/src/test/java/org/apache/arrow/vector/TestVarCharViewVector.java:
##########
@@ -1455,38 +1457,28 @@ public void
testSafeOverwriteLongFromALongerLongString() {
}
}
- private ViewVarCharVector createViewVarCharVector(BufferAllocator allocator)
{
- return newVector(ViewVarCharVector.class, EMPTY_SCHEMA_PATH,
- Types.MinorType.VIEWVARCHAR, allocator);
- }
-
- private ViewVarBinaryVector createViewVarBinaryVector(BufferAllocator
allocator) {
- return newVector(ViewVarBinaryVector.class, EMPTY_SCHEMA_PATH,
- Types.MinorType.VIEWVARBINARY, allocator);
+ static Stream<Arguments> vectorTypeProvider() {
+ return Stream.of(
+ Arguments.of(Types.MinorType.VIEWVARBINARY),
+ Arguments.of(Types.MinorType.VIEWVARCHAR)
+ );
}
- private BaseVariableWidthViewVector createVector(Types.MinorType type,
BufferAllocator allocator) {
+ BiFunction<BufferAllocator, MinorType, BaseVariableWidthViewVector>
vectorCreator = (allocator, type) -> {
if (type == Types.MinorType.VIEWVARBINARY) {
- return createViewVarBinaryVector(allocator);
+ return newVector(ViewVarBinaryVector.class, EMPTY_SCHEMA_PATH,
Types.MinorType.VIEWVARBINARY, allocator);
} else if (type == Types.MinorType.VIEWVARCHAR) {
- return createViewVarCharVector(allocator);
+ return newVector(ViewVarCharVector.class, EMPTY_SCHEMA_PATH,
Types.MinorType.VIEWVARCHAR, allocator);
} else {
throw new UnsupportedOperationException("Not supported type : " + type);
}
- }
-
- static Stream<Arguments> vectorTypeAndClassProvider() {
- return Stream.of(
- Arguments.of(Types.MinorType.VIEWVARBINARY),
- Arguments.of(Types.MinorType.VIEWVARCHAR)
- );
- }
+ };
@ParameterizedTest
- @MethodSource({"vectorTypeAndClassProvider"})
+ @MethodSource({"vectorTypeProvider"})
Review Comment:
Resolving conflicts...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]