public static Schema toArrowSchema(RowType rowType) {
        Collection<Field> fields =
                rowType.getFields().stream()
                        .map(f -> ArrowUtils.toArrowField(f.getName(), f.getType()))
                        .collect(Collectors.toCollection(ArrayList::new));
        return new Schema(fields);
    }
@Test
    void testConvertBetweenLogicalTypeAndArrowType() {
        Schema schema = ArrowUtils.toArrowSchema(rowType);

        assertThat(schema.getFields()).hasSize(testFields.size());
        List<Field> fields = schema.getFields();
        for (int i = 0; i < schema.getFields().size(); i++) {
            // verify convert from RowType to ArrowType
            assertThat(fields.get(i).getName()).isEqualTo(testFields.get(i).f0);
            assertThat(fields.get(i).getType()).isEqualTo(testFields.get(i).f2);
        }
    }