VasShabu commented on code in PR #29335:
URL: https://github.com/apache/flink/pull/29335#discussion_r4160903848


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/SystemTypeInference.java:
##########
@@ -348,6 +348,12 @@ public Optional<DataType> inferType(CallContext 
callContext) {
                                     
fields.addAll(deriveRowtimeField(callContext, resolvedArgs));
                                 }
 
+                                if (fields.isEmpty()) {
+                                    // Only a fully empty row falls back to 
EXPR$0, for backwards
+                                    // compatibility.
+                                    fields.add(DataTypes.FIELD("EXPR$0", 
functionDataType));
+                                }
+

Review Comment:
   Hi Gustavo, regarding this part of the code, If it ends up that there is no 
columns in the table the engine is trying to build, surely that should result 
in a validation Error as you can put anything in the table anyways?
   
   I will change it to what we have above anyways but just wanted to put this 
out there.



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

Reply via email to