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)