Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-2248

Comparison Operators convert number types to common type instead of double if possible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.8.0
    • Query Processor
    • None
    • Reviewed

    Description

      Now if the two sides of comparison is of different type, we always convert both to double and compare. It was a slight regression from the change in https://issues.apache.org/jira/browse/HIVE-1638. The old UDFOP<Comparison>, using GenericUDFBridge, always tried to find common type first.

      The worse case is this: If you did "WHERE <BIGINT_COLUMN> = 0 ", we always convert the column and 0 to double and compare, which is wasteful, though it is usually a minor costs in the system. But it is easy to fix.

      Attachments

        1. HIVE-2248.1.patch
          2 kB
          Siying Dong

        Activity

          People

            sdong Siying Dong
            sdong Siying Dong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: