Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3677

Wrong result with LEAD window function when used in multiple windows in the same query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Invalid
    • 1.2.0
    • 1.2.0
    • Functions - Drill
    • None

    Description

      Query produces wrong result:

      select
              c_integer,
              lead(c_integer) over (order by c_integer),
              lead(c_integer) over (partition by c_time order by c_date)
      from
              j1
      ;
      

      Attached: q46.res (result generated from postgres)
      q46.out (output from Drill)
      j1.tar - table used in the query

      I tried to reproduce the same error on a smaller data set without any success. Tried with the table with the same data as j1, but single parquet file: same behavior.

      Attachments

        1. j1.tar
          1.03 MB
          Victoria Markman
        2. q46.out
          278 kB
          Victoria Markman
        3. q46.res
          278 kB
          Victoria Markman

        Activity

          People

            adeneche Abdel Hakim Deneche
            vicky Victoria Markman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: