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

positive() and negative() functions return wrong results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • Impala 1.0.1
    • None
    • None

    Description

      The positive() and negative() functions seem to be broken

      > describe foobar;
      Query: describe foobar
      Query finished, fetching results ...
      +------+------+---------+
      | name | type | comment |
      +------+------+---------+
      | i    | int  |         |
      +------+------+---------+
      Returned 1 row(s) in 0.02s
      
      > select * from foobar;
      Query: select * from foobar
      Query finished, fetching results ...
      +----+
      | i  |
      +----+
      | 1  |
      | -1 |
      | 2  |
      | -2 |
      +----+
      Returned 4 row(s) in 0.40s
      
      > select negative(i) from foobar;
      Query: select negative(i) from foobar
      Query finished, fetching results ...
      +-----+
      | _c0 |
      +-----+
      | -1  |
      | 1   |
      | -2  |
      | 2   |
      +-----+
      Returned 4 row(s) in 0.40s
      
      > select positive(i) from foobar;
      Query: select positive(i) from foobar
      Query finished, fetching results ...
      +-----+
      | _c0 |
      +-----+
      | 1   |
      | -1  |
      | 2   |
      | -2  |
      +-----+
      Returned 4 row(s) in 0.40s
      
      > select abs(i) from foobar;
      Query: select abs(i) from foobar
      Query finished, fetching results ...
      +-----+
      | _c0 |
      +-----+
      | 1   |
      | 1   |
      | 2   |
      | 2   |
      +-----+
      Returned 4 row(s) in 0.40s
      

      Attachments

        Activity

          People

            alan@cloudera.com Alan Choi
            grahn Greg Rahn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: