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

OVER accepts general expression instead of just function

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: PTF-Windowing
    • Labels:
      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.patch
          46 kB
          Ashutosh Chauhan
        2. HIVE-4214.1.patch
          49 kB
          Ashutosh Chauhan
        3. HIVE-4214.3.patch
          49 kB
          Ashutosh Chauhan

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: