Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-1320

'a' should be equal to CAST('a' AS CHAR(2))

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • Impala 2.0
    • Impala 2.0
    • None
    • None

    Description

      I tried disabling codegen but it's the same.

      Postgresql and Oracle say the first query below should evaluate to true.

      [localhost.localdomain:21000] > select 'a' = cast('a' as char(2));
      Query: select 'a' = cast('a' as char(2))
      +----------------------------+
      | 'a' = cast('a' as char(2)) |
      +----------------------------+
      | false                      |
      +----------------------------+
      Fetched 1 row(s) in 0.02s
      
      
      [localhost.localdomain:21000] > select 'a' = cast('a' as char(1));
      Query: select 'a' = cast('a' as char(1))
      +----------------------------+
      | 'a' = cast('a' as char(1)) |
      +----------------------------+
      | true                       |
      +----------------------------+
      Fetched 1 row(s) in 0.01s
      
      
      [localhost.localdomain:21000] > select cast('a' as char(2));
      Query: select cast('a' as char(2))
      +----------------------+
      | cast('a' as char(2)) |
      +----------------------+
      | a                    |
      +----------------------+
      Fetched 1 row(s) in 0.01s
      
      
      [localhost.localdomain:21000] > select length(cast('a' as char(2)));
      Query: select length(cast('a' as char(2)))
      +------------------------------+
      | length(cast('a' as char(2))) |
      +------------------------------+
      | 1                            |
      +------------------------------+
      Fetched 1 row(s) in 0.02s
      

      Postgresql

      functional=# select 'a' = cast('a' as char(2));
       ?column? 
      ----------
       t
      (1 row)
      

      Attachments

        Activity

          People

            victor.bittorf_impala_fcb6 Victor Bittorf
            caseyc casey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: