dawidwys commented on a change in pull request #10307: [FLINK-14903][table] 
Relax structured types constraints
URL: https://github.com/apache/flink/pull/10307#discussion_r350064088
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/utils/LogicalTypeDuplicator.java
 ##########
 @@ -107,22 +109,32 @@ public LogicalType visit(StructuredType structuredType) {
                                        a.getType().accept(this));
                        })
                        .collect(Collectors.toList());
-               final StructuredType.Builder builder = new 
StructuredType.Builder(
-                       structuredType.getObjectIdentifier(),
-                       attributes);
-               builder.setNullable(structuredType.isNullable());
-               builder.setFinal(structuredType.isFinal());
-               builder.setInstantiable(structuredType.isInstantiable());
-               builder.setComparision(structuredType.getComparision());
+               final Optional<ObjectIdentifier> identifier = 
structuredType.getOptionalObjectIdentifier();
+               final Optional<Class<?>> implementationClass = 
structuredType.getImplementationClass();
+
+               final StructuredType.Builder builder;
 
 Review comment:
   nit: This is really nitpicking. How about extracting the instantiation of 
new `builder` and duplicating the attributes to separate methods. The visit 
method is already quite long.

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