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/02/15 20:21:00 UTC

[jira] [Created] (CALCITE-2180) Invalid code generated for negative of byte and short values

Julian Hyde created CALCITE-2180:
------------------------------------

             Summary: Invalid code generated for negative of byte and short values
                 Key: CALCITE-2180
                 URL: https://issues.apache.org/jira/browse/CALCITE-2180
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde
            Assignee: Julian Hyde


Invalid code is generated for negative of byte and short values. The reason is that, in Java, if b is a value of type {{byte}}, then {{-b}} has type {{int}}; similarly if {{b}} has type {{short}}. The code generator needs to accommodate for this.

The query {code}select -deptno from dept{code} demonstrates the problem, since {{deptno}} has SQL type {{TINYINT}}.



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