right) {
@Test
public void testAllMap() throws IOException {
SchemaMapping map = converter.map(allTypesArrowSchema, allTypesParquetSchema);
- Assert.assertEquals("p, s, l
, u
, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p", toSummaryString(map));
+ Assert.assertEquals("p, s
, l
, l
, u
, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p, p", toSummaryString(map));
}
private String toSummaryString(SchemaMapping map) {
@@ -301,32 +309,32 @@ private String toSummaryString(List fields) {
sb.append(", ");
}
sb.append(
- typeMapping.accept(new TypeMappingVisitor() {
- @Override
- public String visit(PrimitiveTypeMapping primitiveTypeMapping) {
- return "p";
- }
+ typeMapping.accept(new TypeMappingVisitor() {
+ @Override
+ public String visit(PrimitiveTypeMapping primitiveTypeMapping) {
+ return "p";
+ }
- @Override
- public String visit(StructTypeMapping structTypeMapping) {
- return "s";
- }
+ @Override
+ public String visit(StructTypeMapping structTypeMapping) {
+ return "s";
+ }
- @Override
- public String visit(UnionTypeMapping unionTypeMapping) {
- return "u";
- }
+ @Override
+ public String visit(UnionTypeMapping unionTypeMapping) {
+ return "u";
+ }
- @Override
- public String visit(ListTypeMapping listTypeMapping) {
- return "l";
- }
+ @Override
+ public String visit(ListTypeMapping listTypeMapping) {
+ return "l";
+ }
- @Override
- public String visit(RepeatedTypeMapping repeatedTypeMapping) {
- return "r";
- }
- })
+ @Override
+ public String visit(RepeatedTypeMapping repeatedTypeMapping) {
+ return "r";
+ }
+ })
);
if (typeMapping.getChildren() != null && !typeMapping.getChildren().isEmpty()) {
sb.append("<").append(toSummaryString(typeMapping.getChildren())).append(">");