[ 
https://issues.apache.org/jira/browse/FLINK-7291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16106332#comment-16106332
 ] 

Aljoscha Krettek commented on FLINK-7291:
-----------------------------------------

I'm not sure whether it might actually be like this on purpose. The arity says 
how many fields there are, statically. Initially, this was introduced for tuple 
types, where there are really a given number of fields that can be determined 
statically when analysing the type. Same for atomic types, where there is 
always one "field". For lists, maps and other dynamic types the number of 
contained objects cannot be statically determined, that's why it's zero.

> Incorrect return value of getArity() in ListTypeInfo and MapTypeInfo
> --------------------------------------------------------------------
>
>                 Key: FLINK-7291
>                 URL: https://issues.apache.org/jira/browse/FLINK-7291
>             Project: Flink
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.1, 1.4.0
>            Reporter: Fabian Hueske
>
> The implementation of {{getArity()}} in {{ListTypeInfo}} and {{MapTypeInfo}} 
> returns 0 but should return 1.
> The implementation of {{MapTypeInfo.getTotalFields()}} is also incorrect and 
> must return 1 instead of 2.
> The JavaDocs of {{TypeInformation.getArity()}} and 
> {{TypeInformation.getTotalFields()}} should be extended as well to avoid 
> future confusion about this method. The method returns the arity for current 
> type. For atomic types, this is 1 for composite types, the number of 
> non-nested fields (or number of fields on the first nesting-level).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to