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

Invalid code generated for negative of byte and short values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.16.0
    • None
    • 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

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: