Skip to content

Commit

Permalink
Core: Replace deprecated Schema.toString with SchemaFormatter (#11867)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr authored Dec 25, 2024
1 parent 1b5886d commit 4eb9f7f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.avro.LogicalTypes;
import org.apache.avro.Schema;
import org.apache.avro.SchemaBuilder;
import org.apache.avro.SchemaFormatter;
import org.apache.iceberg.relocated.com.google.common.collect.Iterables;
import org.apache.iceberg.relocated.com.google.common.collect.Lists;
import org.apache.iceberg.types.Type;
Expand Down Expand Up @@ -320,7 +321,8 @@ public void testComplexSchema() {
"properties",
Types.MapType.ofOptional(18, 19, Types.StringType.get(), Types.StringType.get())));

AvroSchemaUtil.convert(schema, "newTableName").toString(true);
SchemaFormatter.getInstance("json/pretty")
.format(AvroSchemaUtil.convert(schema, "newTableName"));
}

@Test
Expand Down

0 comments on commit 4eb9f7f

Please sign in to comment.