diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/AbstractJdbcToArrowTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/AbstractJdbcToArrowTest.java index 185bd9cc8f89e..eaaff83960d64 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/AbstractJdbcToArrowTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/AbstractJdbcToArrowTest.java @@ -89,14 +89,15 @@ protected static Table getTable(String ymlFilePath, @SuppressWarnings("rawtypes" clss.getClassLoader().getResourceAsStream(ymlFilePath), Table.class); } - /** * This method creates Connection object and DB table and also populate data into table for test. * * @throws SQLException on error * @throws ClassNotFoundException on error */ - public void setUp() throws SQLException, ClassNotFoundException { + protected void initializeDatabase(Table table) throws SQLException, ClassNotFoundException { + this.table = table; + TimeZone.setDefault(TimeZone.getTimeZone("UTC")); String url = "jdbc:h2:mem:JdbcToArrowTest"; String driver = "org.h2.Driver"; diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/UnreliableMetaDataTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/UnreliableMetaDataTest.java index 35861abfb5bea..8b30c874466e1 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/UnreliableMetaDataTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/UnreliableMetaDataTest.java @@ -30,10 +30,10 @@ import java.sql.Types; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.stream.Stream; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.memory.RootAllocator; @@ -44,22 +44,16 @@ import org.apache.arrow.vector.types.pojo.Schema; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; /** * Test options for dealing with unreliable ResultSetMetaData from JDBC drivers. */ -@RunWith(Parameterized.class) public class UnreliableMetaDataTest { - private final boolean reuseVectorSchemaRoot; private BufferAllocator allocator; - public UnreliableMetaDataTest(boolean reuseVectorSchemaRoot) { - this.reuseVectorSchemaRoot = reuseVectorSchemaRoot; - } - @BeforeEach public void beforeEach() { allocator = new RootAllocator(); @@ -70,13 +64,13 @@ public void afterEach() { allocator.close(); } - @Parameterized.Parameters(name = "reuseVectorSchemaRoot = {0}") - public static Collection getTestData() { - return Arrays.asList(new Object[][] { {false}, {true} }); + public static Stream getTestData() { + return Arrays.stream(new Object[][] { {false}, {true} }).map(Arguments::of); } - @Test - public void testUnreliableMetaDataPrecisionAndScale() throws Exception { + @ParameterizedTest + @MethodSource("getTestData") + public void testUnreliableMetaDataPrecisionAndScale(boolean reuseVectorSchemaRoot) throws Exception { ResultSet rs = buildIncorrectPrecisionAndScaleMetaDataResultSet(); ResultSetMetaData rsmd = rs.getMetaData(); assertEquals(Types.DECIMAL, rsmd.getColumnType(1), "Column type should be Types.DECIMAL"); @@ -119,8 +113,9 @@ public void testUnreliableMetaDataPrecisionAndScale() throws Exception { } } - @Test - public void testInconsistentPrecisionAndScale() throws Exception { + @ParameterizedTest + @MethodSource("getTestData") + public void testInconsistentPrecisionAndScale(boolean reuseVectorSchemaRoot) throws Exception { ResultSet rs = buildVaryingPrecisionAndScaleResultSet(); ResultSetMetaData rsmd = rs.getMetaData(); assertEquals(Types.DECIMAL, rsmd.getColumnType(1), "Column type should be Types.DECIMAL"); @@ -166,8 +161,9 @@ public void testInconsistentPrecisionAndScale() throws Exception { } } - @Test - public void testIncorrectNullability() throws Exception { + @ParameterizedTest + @MethodSource("getTestData") + public void testIncorrectNullability(boolean reuseVectorSchemaRoot) throws Exception { // ARROW-17005: ResultSetMetaData may indicate a field is non-nullable even when there are nulls ResultSetUtility.MockResultSetMetaData.MockColumnMetaData columnMetaData = ResultSetUtility.MockResultSetMetaData.MockColumnMetaData.builder() diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowCharSetTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowCharSetTest.java index 6114406570925..e7ef183bc1d49 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowCharSetTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowCharSetTest.java @@ -40,7 +40,6 @@ import org.apache.arrow.vector.VarCharVector; import org.apache.arrow.vector.VectorSchemaRoot; import org.apache.arrow.vector.types.pojo.Schema; -import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -58,12 +57,13 @@ public class JdbcToArrowCharSetTest extends AbstractJdbcToArrowTest { "h2/test1_charset_kr_h2.yml" }; - private void initializeDatabase(Table table) throws SQLException, ClassNotFoundException { + public void initializeDatabase(Table table) throws SQLException, ClassNotFoundException { + this.table = table; + String url = "jdbc:h2:mem:JdbcToArrowTest?characterEncoding=UTF-8"; String driver = "org.h2.Driver"; Class.forName(driver); conn = DriverManager.getConnection(url); - this.table = table; try (Statement stmt = conn.createStatement();) { stmt.executeUpdate(table.getCreate()); for (String insert : table.getData()) { @@ -91,7 +91,8 @@ public static Stream getTestData() throws SQLException, ClassNotFound @ParameterizedTest @MethodSource("getTestData") public void testJdbcToArrowValues(Table table) throws SQLException, IOException, ClassNotFoundException { - initializeDatabase(table); + this.initializeDatabase(table); + testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance()), false); testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE)), false); @@ -111,8 +112,11 @@ public void testJdbcToArrowValues(Table table) throws SQLException, IOException, new JdbcToArrowConfigBuilder(new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance()).build()), false); } - @Test - public void testJdbcSchemaMetadata() throws SQLException { + @ParameterizedTest + @MethodSource("getTestData") + public void testJdbcSchemaMetadata(Table table) throws SQLException, ClassNotFoundException { + this.initializeDatabase(table); + JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(new RootAllocator(0), Calendar.getInstance(), true).build(); ResultSetMetaData rsmd = conn.createStatement().executeQuery(table.getQuery()).getMetaData(); Schema schema = JdbcToArrowUtils.jdbcToArrowSchema(rsmd, config); diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowDataTypesTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowDataTypesTest.java index 02d1fa5b32784..6b34d20258feb 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowDataTypesTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowDataTypesTest.java @@ -65,7 +65,6 @@ import org.apache.arrow.vector.VectorSchemaRoot; import org.apache.arrow.vector.complex.ListVector; import org.apache.arrow.vector.types.pojo.Schema; -import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -135,7 +134,9 @@ public static Stream getTestData() throws SQLException, ClassNotFound */ @ParameterizedTest @MethodSource("getTestData") - public void testJdbcToArrowValues(Table table) throws SQLException, IOException { + public void testJdbcToArrowValues(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance()), false); testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE)), false); @@ -158,8 +159,11 @@ public void testJdbcToArrowValues(Table table) throws SQLException, IOException .build()), false); } - @Test - public void testJdbcSchemaMetadata() throws SQLException { + @ParameterizedTest + @MethodSource("getTestData") + public void testJdbcSchemaMetadata(Table table) throws SQLException, ClassNotFoundException { + this.initializeDatabase(table); + JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(new RootAllocator(0), Calendar.getInstance(), true) .setArraySubTypeByColumnNameMap(ARRAY_SUB_TYPE_BY_COLUMN_NAME_MAP) .build(); diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowMapDataTypeTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowMapDataTypeTest.java index e7c34c5c69a64..3aff90378de4d 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowMapDataTypeTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowMapDataTypeTest.java @@ -50,7 +50,9 @@ public static Stream getTestData() throws IOException { */ @ParameterizedTest @MethodSource("getTestData") - public void testJdbcToArrowValues(Table table) throws SQLException, IOException { + public void testJdbcToArrowValues(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + this.table = getTable("h2/test1_map_h2.yml", JdbcToArrowMapDataTypeTest.class); Calendar calendar = Calendar.getInstance(); ResultSetMetaData rsmd = getQueryMetaData(table.getQuery()); diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowNullTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowNullTest.java index af84119410371..b3ec7564b79bf 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowNullTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowNullTest.java @@ -76,7 +76,6 @@ import org.apache.arrow.vector.complex.ListVector; import org.apache.arrow.vector.complex.MapVector; import org.apache.arrow.vector.types.pojo.Schema; -import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -114,7 +113,9 @@ public static Stream getTestData() throws SQLException, ClassNotFound */ @ParameterizedTest @MethodSource("getTestData") - public void testJdbcToArrowValues(Table table) throws SQLException, IOException { + public void testJdbcToArrowValues(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance()), false); testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE)), false); @@ -141,8 +142,11 @@ public void testJdbcToArrowValues(Table table) throws SQLException, IOException .build()), true); } - @Test - public void testJdbcSchemaMetadata() throws SQLException { + @ParameterizedTest + @MethodSource("getTestData") + public void testJdbcSchemaMetadata(Table table) throws SQLException, ClassNotFoundException { + this.initializeDatabase(table); + JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(new RootAllocator(0), Calendar.getInstance(), true) .setArraySubTypeByColumnNameMap(ARRAY_SUB_TYPE_BY_COLUMN_NAME_MAP) .build(); diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowOptionalColumnsTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowOptionalColumnsTest.java index bc81d91fbd612..1ec6f2a8fcf2a 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowOptionalColumnsTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowOptionalColumnsTest.java @@ -60,7 +60,9 @@ public static Stream getTestData() throws SQLException, ClassNotFound */ @ParameterizedTest @MethodSource("getTestData") - public void testJdbcToArrowValues(Table table) throws SQLException, IOException { + public void testJdbcToArrowValues(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE)), false); } diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTest.java index c51ca1e2f64c3..c73d45254adca 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTest.java @@ -57,7 +57,6 @@ import org.apache.arrow.vector.complex.ListVector; import org.apache.arrow.vector.complex.MapVector; import org.apache.arrow.vector.types.pojo.Schema; -import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -70,17 +69,6 @@ public class JdbcToArrowTest extends AbstractJdbcToArrowTest { private static final String[] testFiles = {"h2/test1_all_datatypes_h2.yml"}; - /** - * Constructor which populates the table object for each test iteration. - * - * @param table Table object - * @param reuseVectorSchemaRoot A flag indicating if we should reuse vector schema roots. - */ - public JdbcToArrowTest(Table table, boolean reuseVectorSchemaRoot) { - this.table = table; - this.reuseVectorSchemaRoot = reuseVectorSchemaRoot; - } - /** * Get the test data as a collection of Table objects for each test iteration. * @@ -99,7 +87,9 @@ public static Stream getTestData() throws SQLException, ClassNotFound */ @ParameterizedTest @MethodSource("getTestData") - public void testJdbcToArrowValues(Table table) throws SQLException, IOException { + public void testJdbcToArrowValues(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance()), false); testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE)), false); @@ -127,8 +117,11 @@ public void testJdbcToArrowValues(Table table) throws SQLException, IOException .build()), true); } - @Test - public void testJdbcSchemaMetadata() throws SQLException { + @ParameterizedTest + @MethodSource("getTestData") + public void testJdbcSchemaMetadata(Table table) throws SQLException, ClassNotFoundException { + this.initializeDatabase(table); + Calendar calendar = Calendar.getInstance(); ResultSetMetaData rsmd = getQueryMetaData(table.getQuery()); JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(new RootAllocator(0), calendar, true) @@ -212,8 +205,11 @@ public void testDataSets(VectorSchemaRoot root, boolean isIncludeMapVector) { } } - @Test - public void runLargeNumberOfRows() throws IOException, SQLException { + @ParameterizedTest + @MethodSource("getTestData") + public void runLargeNumberOfRows(Table table) throws IOException, SQLException, ClassNotFoundException { + this.initializeDatabase(table); + BufferAllocator allocator = new RootAllocator(Integer.MAX_VALUE); int x = 0; final int targetRows = 600000; diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTimeZoneTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTimeZoneTest.java index 07884fae3ba29..b9fe77844bb3b 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTimeZoneTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTimeZoneTest.java @@ -41,7 +41,6 @@ import org.apache.arrow.vector.TimeStampVector; import org.apache.arrow.vector.VectorSchemaRoot; import org.apache.arrow.vector.types.pojo.Schema; -import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -88,8 +87,9 @@ public static Stream getTestData() throws SQLException, ClassNotFound */ @ParameterizedTest @MethodSource("getTestData") - public void testJdbcToArrowValues(Table table) throws SQLException, IOException { - this.table = table; + public void testJdbcToArrowValues(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + testDataSets(sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance(TimeZone.getTimeZone(table.getTimezone()))), false); testDataSets(sqlToArrow(conn.createStatement().executeQuery(table.getQuery()), @@ -109,8 +109,11 @@ public void testJdbcToArrowValues(Table table) throws SQLException, IOException Calendar.getInstance(TimeZone.getTimeZone(table.getTimezone()))).build()), false); } - @Test - public void testJdbcSchemaMetadata() throws SQLException { + @ParameterizedTest + @MethodSource("getTestData") + public void testJdbcSchemaMetadata(Table table) throws SQLException, ClassNotFoundException { + this.initializeDatabase(table); + Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(table.getTimezone())); JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(new RootAllocator(0), calendar, true).build(); ResultSetMetaData rsmd = conn.createStatement().executeQuery(table.getQuery()).getMetaData(); diff --git a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowVectorIteratorTest.java b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowVectorIteratorTest.java index ec69310d82cd0..938ed7b62c89f 100644 --- a/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowVectorIteratorTest.java +++ b/java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowVectorIteratorTest.java @@ -71,25 +71,16 @@ import org.apache.arrow.vector.complex.ListVector; import org.apache.arrow.vector.types.FloatingPointPrecision; import org.apache.arrow.vector.types.pojo.ArrowType; -import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; public class JdbcToArrowVectorIteratorTest extends JdbcToArrowTest { - /** - * Constructor which populates the table object for each test iteration. - * - * @param table Table object - * @param reuseVectorSchemaRoot A flag indicating if we should reuse vector schema roots. - */ - public JdbcToArrowVectorIteratorTest(Table table, boolean reuseVectorSchemaRoot) { - super(table, reuseVectorSchemaRoot); - } - @ParameterizedTest @MethodSource("getTestData") - public void testJdbcToArrowValues() throws SQLException, IOException { + public void testJdbcToArrowValues(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance()) .setTargetBatchSize(3) @@ -102,8 +93,11 @@ public void testJdbcToArrowValues() throws SQLException, IOException { validate(iterator); } - @Test - public void testVectorSchemaRootReuse() throws SQLException, IOException { + @ParameterizedTest + @MethodSource("getTestData") + public void testVectorSchemaRootReuse(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + Integer[][] intValues = { {101, 102, 103}, {104, null, null}, @@ -174,8 +168,10 @@ public void testVectorSchemaRootReuse() throws SQLException, IOException { assertTrue(batchCount > 1); } - @Test - public void testJdbcToArrowValuesNoLimit() throws SQLException, IOException { + @ParameterizedTest + @MethodSource("getTestData") + public void testJdbcToArrowValuesNoLimit(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance()) @@ -189,8 +185,11 @@ public void testJdbcToArrowValuesNoLimit() throws SQLException, IOException { validate(iterator); } - @Test - public void testTimeStampConsumer() throws SQLException, IOException { + @ParameterizedTest + @MethodSource("getTestData") + public void testTimeStampConsumer(Table table) throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + final String sql = "select timestamp_field11 from table1"; // first experiment, with calendar and time zone. @@ -510,8 +509,12 @@ private FieldVector getQueryResult(JdbcToArrowConfig config) throws SQLException return result; } - @Test - public void testJdbcToArrowCustomTypeConversion() throws SQLException, IOException { + @ParameterizedTest + @MethodSource("getTestData") + public void testJdbcToArrowCustomTypeConversion(Table table) + throws SQLException, IOException, ClassNotFoundException { + this.initializeDatabase(table); + JdbcToArrowConfigBuilder builder = new JdbcToArrowConfigBuilder(new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance()).setTargetBatchSize(JdbcToArrowConfig.NO_LIMIT_BATCH_SIZE) .setReuseVectorSchemaRoot(reuseVectorSchemaRoot)