srinipunuru commented on a change in pull request #1153: SAMZA-2320: Samza-sql: 
Refactor validation to cover more cases and make it more extensible.
URL: https://github.com/apache/samza/pull/1153#discussion_r324298767
 
 

 ##########
 File path: 
samza-sql/src/main/java/org/apache/samza/sql/avro/AvroTypeFactoryImpl.java
 ##########
 @@ -52,15 +52,18 @@ public SqlSchema createType(Schema schema) {
       throw new SamzaException(msg);
     }
 
-    return convertSchema(schema.getFields());
+    return convertSchema(schema.getFields(), true);
   }
 
-  private SqlSchema convertSchema(List<Schema.Field> fields) {
+  protected boolean isOptional(Schema.Field field, boolean isTopLevel) {
+    return field.defaultValue() != null;
 
 Review comment:
   Why is isTopLevel being passed when it's not used?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to