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

Julian Hyde commented on CALCITE-4226:
--------------------------------------

What you should do to make me less angry is hear me. I wrote the Mappings 
class, I wrote a lot of the code that uses it, I have sympathy for your 
principles that methods should not return null values, I am aware that there 
are design problems in the Mappings class that make it difficult to use, and 
synthesizing all of these facts it is my opinion that your change does not 
improve things.

You should also not presume that you have 'won the argument' just because you 
keep on posting to the thread and the other person has run out of time and 
energy.

> Add Mappings#asListNonNull as a null-safe alternative for Mappings#asList
> -------------------------------------------------------------------------
>
>                 Key: CALCITE-4226
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4226
>             Project: Calcite
>          Issue Type: Sub-task
>          Components: core
>    Affects Versions: 1.25.0
>            Reporter: Vladimir Sitnikov
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.26.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> It looks like none of the uses for Mappings#asList is ready to handle nulls.
> So far there are 6 usages of the method, however, it is puzzling if NPE is 
> expected behavior there.
> I'm inclined to create two variations of the method:
> 1) {{List<@Nullable Integer> asList(...)}} -- keep the current method current 
> one
> 2) {{List<@NonNull Integer> asList(...)}} -- throw exceptions on invalid 
> mappings



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to