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

OVER accepts general expression instead of just function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.11.0
    • 0.12.0
    • PTF-Windowing
    • None

    Description

      The query:

      select s, i, avg(d) / 10.0 over (partition by s order by i) from over100k;

      runs (and produces meaningless output).

      Over should not allow the arithmetic expression. Only a UDAF or PTF function should be valid there. The correct way to write this query should be

      select s, i, avg(d) over (partition by s order by i) / 10. 0 from over100k;

      Attachments

        1. HIVE-4214.1.patch
          49 kB
          Ashutosh Chauhan
        2. HIVE-4214.3.patch
          49 kB
          Ashutosh Chauhan
        3. HIVE-4214.patch
          46 kB
          Ashutosh Chauhan

        Activity

          People

            ashutoshc Ashutosh Chauhan
            gates Alan Gates
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: