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/16 22:41:00 UTC
[jira] [Resolved] (CALCITE-2180) Invalid code generated for
negative of byte and short values
[ https://issues.apache.org/jira/browse/CALCITE-2180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde resolved CALCITE-2180.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.16.0
Fixed in [3c67a605|http://git-wip-us.apache.org/repos/asf/calcite/commit/3c67a605].
> 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
> Priority: Major
> Fix For: 1.16.0
>
>
> 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)