You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/09/16 18:13:00 UTC

[jira] [Commented] (CALCITE-2561) Suspicious code in org.apache.calcite.materialize.Lattice constructor

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

Julian Hyde commented on CALCITE-2561:
--------------------------------------

Yes that's dead code and can go.

> Suspicious code in org.apache.calcite.materialize.Lattice constructor
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-2561
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2561
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Minor
>
> https://github.com/apache/calcite/blob/d59b639d27da704f00eff616324a2c04aa06f84c/core/src/main/java/org/apache/calcite/materialize/Lattice.java#L111-L114
> The contents of {{nameList}} is updated, but it is never queried
> {code:java}    List<String> nameList = new ArrayList<>();
>     for (Column column : columns) {
>       nameList.add(column.alias);
>     }
>     uniqueColumnNames =
>         ImmutableList.copyOf(
>             SqlValidatorUtil.uniquify(
>                 Lists.transform(columns, input -> input.alias), true));
> {code}
> [~julianhyde], should {{nameList}} be just removed?
> It looks like {{Lists.transform(columns, input -> input.alias)}} and {{nameList}} are the same thing.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)