Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2180

Invalid code generated for negative of byte and short values

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.16.0
    • Component/s: None
    • Labels:
      None

      Description

      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

      select -deptno from dept

      demonstrates the problem, since deptno has SQL type TINYINT.

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: