Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4100#discussion_r121265361
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala
 ---
    @@ -718,16 +718,20 @@ abstract class TableEnvironment(val config: 
TableConfig) {
         // validate that at least the field types of physical and logical type 
match
         // we do that here to make sure that plan translation was correct
         if (schema.physicalTypeInfo != inputTypeInfo) {
    -      throw TableException("The field types of physical and logical row 
types do not match." +
    -        "This is a bug and should not happen. Please file an issue.")
    +      throw TableException(
    +        s"The field types of physical and logical row types do not match. 
" +
    +        s"Physical type is [${schema.physicalTypeInfo}], Logical type is 
[${inputTypeInfo}]. " +
    +        s"This is a bug and should not happen. Please file an issue.")
         }
     
         val fieldTypes = schema.physicalFieldTypeInfo
         val fieldNames = schema.physicalFieldNames
     
         // validate requested type
         if (requestedTypeInfo.getArity != fieldTypes.length) {
    -      throw new TableException("Arity of result does not match requested 
type.")
    +      throw new TableException(
    +        s"Arity[${requestedTypeInfo.getArity}] of 
result[${requestedTypeInfo}] does not match " +
    --- End diff --
    
    Result and requested types need to be switched.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to