You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Vladimir Sitnikov (Jira)" <ji...@apache.org> on 2020/09/03 19:33:00 UTC

[jira] [Created] (CALCITE-4226) Mappings#asList might return null for negative ordinals which would result in later NPEs

Vladimir Sitnikov created CALCITE-4226:
------------------------------------------

             Summary: Mappings#asList might return null for negative ordinals which would result in later NPEs
                 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


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)