1. 17 Mar, 2016 2 commits
  2. 16 Mar, 2016 2 commits
  3. 15 Mar, 2016 6 commits
    • Vicențiu Ciorbaru's avatar
      Implemented avg() window function. · 21651541
      Vicențiu Ciorbaru authored
      It is based on the sum() function, thus much of the logic is shared.
      
      Considering that there are 2 counters stored within the function, one
      that handles the null value, while the other that handles the divisor
      for the avg computation, it is possible to remove the counter from the
      Item_sum_avg. I have not removed it in this patch as we may choose to
      refactor the whole code into a separate class.
      This remains to be dicussed.
      21651541
    • Vicențiu Ciorbaru's avatar
      Fix 2 more bugs in item_windowfunc. · aa74fef2
      Vicențiu Ciorbaru authored
      1. Item_windowfunc must check the nullness of the field if it returns the
         value from the result_field.
      2. The decimal value must come from the window_func instead of the
         result_field when not fetching values from the result_field.
      
      Added a more extensive test case that highlights if these bugs occur.
      The 2 select statements check behaviour for decimal and real typed
      fields respectively.
      aa74fef2
    • Vicențiu Ciorbaru's avatar
      Remove no longer needed TODO. · 350903e9
      Vicențiu Ciorbaru authored
      350903e9
    • Vicențiu Ciorbaru's avatar
      Make sure to return the result value when calling Item_windowfunc::val_real() · 333ac13b
      Vicențiu Ciorbaru authored
      This caused Item_windowfunc to return garbage.
      333ac13b
    • Sergei Petrunia's avatar
      Continuation of "Implemented a counter within Item_sum_sum" a few commits before · 83330431
      Sergei Petrunia authored
      Query result had 0 where it should have had NULLs:
      - Make Item_window_func::val* functions honor NULL-handling conventions:
        1. set null_value to indicate whether we've returned a NULL value
        2. val_str and val_decimal should return NULL pointer when they're
           returning SQL NULL value.
      
      Fix assertion failure when sending results to network.
      - The assert was due to window func returing SQL NULL despite having
        maybe_null=false
      - Fixed by settting Item_window_func::maybe_null correctly in fix_fields
      83330431
    • Sergei Petrunia's avatar
      MDEV-8646: Re-engineer the code for post-join operations · 21a0291c
      Sergei Petrunia authored
      Make query pushdown work in the post-refactored code.
      This fixes sequence.group_by test.
      21a0291c
  4. 14 Mar, 2016 4 commits
  5. 13 Mar, 2016 2 commits
  6. 11 Mar, 2016 3 commits
  7. 10 Mar, 2016 1 commit
  8. 07 Mar, 2016 3 commits
  9. 06 Mar, 2016 2 commits
  10. 03 Mar, 2016 2 commits
  11. 02 Mar, 2016 3 commits
  12. 01 Mar, 2016 1 commit
  13. 27 Feb, 2016 1 commit
  14. 25 Feb, 2016 1 commit
    • Sergei Petrunia's avatar
      MDEV-9634: Window function produces incorrect value · d290a665
      Sergei Petrunia authored
      - Item_sum_count::remove() should check if the argument's value is NULL.
      - Window Function item must have its Item_window_func::split_sum_func
        called,
      - and it must call split_sum_func for aggregate's arguments (see the
        comment near Item_window_func::split_sum_func for explanation why)
      d290a665
  15. 20 Feb, 2016 1 commit
  16. 17 Feb, 2016 1 commit
    • Sergei Petrunia's avatar
      MDEV-9526: Compute Aggregate functions as window functions · be158582
      Sergei Petrunia authored
      - Add temporary code: clone_read_record() clones READ_RECORD structure,
        as long as it is used for reading filesort() result that fits into
        memory.
      - Add frame bounds for ROWS-type frames. ROWS n PRECEDING|FOLLOWING,
        ROWS UNBOUNDED PRECEDING|FOLLOWING, CURRENT ROW are supported.
      - Add Item_sum_count::remove() which allows "streaming" computation
        of COUNT() over a moving frame.
      be158582
  17. 15 Feb, 2016 5 commits