stevenzwu commented on code in PR #19645:
URL: https://github.com/apache/flink/pull/19645#discussion_r865464452
##########
flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/utils/AvroTestUtils.java:
##########
@@ -259,6 +265,51 @@ public static Tuple3<GenericRecord, Row, Schema>
getGenericTestData() {
return t;
}
+ /**
+ * Craft a large Avro Schema which contains more than 0xFFFF characters.
+ *
+ * <p>0xFFFF is the magical number that once a java string length is above
it, then the
+ * serialization scheme changes
+ */
+ public static Schema getLargeSchema() {
+ SchemaBuilder.FieldAssembler<Schema> fields =
+ SchemaBuilder.record("LargeAvroSchema")
+
.namespace(AvroSerializerLargeGenericRecordTest.class.getName())
+ .fields();
+ int fieldIndex = 0;
+ List<
Review Comment:
this BiFucntion is a little hard to read. might be simpler just add a single
field in the for/while loop. just add a optionalString field or sth. we don't
need to try different types (like int, double). that is not the point of this
unit test
--
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]