the-other-tim-brown commented on code in PR #11154:
URL: https://github.com/apache/hudi/pull/11154#discussion_r1622695605
##########
hudi-common/src/main/java/org/apache/hudi/internal/schema/convert/AvroInternalSchemaConverter.java:
##########
@@ -151,11 +163,11 @@ public static Schema nullableSchema(Schema schema) {
* @param schema a avro schema.
* @return a hudi type.
*/
- public static Type buildTypeFromAvroSchema(Schema schema) {
+ public static Type buildTypeFromAvroSchema(Schema schema, Map<String,
Integer> existingNameToPositions) {
// set flag to check this has not been visited.
- Deque<String> visited = new LinkedList();
- AtomicInteger nextId = new AtomicInteger(1);
- return visitAvroSchemaToBuildType(schema, visited, true, nextId);
+ Deque<String> visited = new LinkedList<>();
+ AtomicInteger nextId = new AtomicInteger(0);
Review Comment:
I thought this was a bug since you typically start with 0 when coding
--
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]