twalthr commented on a change in pull request #13373:
URL: https://github.com/apache/flink/pull/13373#discussion_r487032180



##########
File path: 
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/AvroRowDeserializationSchema.java
##########
@@ -218,7 +231,7 @@ private Object convertAvroType(Schema schema, 
TypeInformation<?> info, Object ob
                switch (schema.getType()) {
                        case RECORD:
                                if (object instanceof IndexedRecord) {
-                                       return convertAvroRecordToRow(schema, 
(RowTypeInfo) info, (IndexedRecord) object);
+                                       return convertAvroRecordToRow(schema, 
(RowTypeInfo) info, (IndexedRecord) object, jodaConverter);

Review comment:
       we can simply access the member field instead of passing it through the 
methods, no?

##########
File path: 
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/AvroToRowDataConverters.java
##########
@@ -101,7 +106,7 @@ private static AvroToRowDataConverter 
createNullableConverter(LogicalType type)
        /**
         * Creates a runtime converter which assuming input object is not null.
         */
-       private static AvroToRowDataConverter createConverter(LogicalType type) 
{
+       private static AvroToRowDataConverter createConverter(LogicalType type, 
@Nullable JodaConverter jodaConverter) {

Review comment:
       We can simply access JodaConverter where needed as a singleton? I would 
not pollute this methods.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to