- 17 Mar, 2016 2 commits
-
-
Sergei Petrunia authored
Catch errors in window frame definitions
-
Igor Babaev authored
with window functions. Added the test case for it. Also allowed to use aliases for set functions in partition and order lists that are specified in window functions.
-
- 16 Mar, 2016 2 commits
-
-
Sergei Petrunia authored
-
Igor Babaev authored
of the type SQL_I_List<ORDER> rather then the objects of this type. It allows to replace easily one instance of such a list for another. Besides it will facilitate to compare two lists if they originate from the same window specification. In fact any direct assignment for objects of the type SQL_I_List<ORDER> was not valid.
-
- 15 Mar, 2016 6 commits
-
-
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.
-
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.
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
This caused Item_windowfunc to return garbage.
-
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
-
Sergei Petrunia authored
Make query pushdown work in the post-refactored code. This fixes sequence.group_by test.
-
- 14 Mar, 2016 4 commits
-
-
Vicențiu Ciorbaru authored
The counter keeps track of the number of items added to the sum function. It is increased when we add a value to the sum function and decreased when it is removed.
-
Sergei Petrunia authored
-
Vicențiu Ciorbaru authored
This implementation does not deal with the case where removal of elements from the window frame causes the item to turn to a null value.
-
Sergei Petrunia authored
- Handle ORDER BY DESC in window definitions. - Fix an issue in Frame_range_current_row_top
-
- 13 Mar, 2016 2 commits
-
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Add support for "RANGE n PRECEDING|FOLLOWING" frame bounds. - n is currently limited to whatever Item and Item_sum_plus/minus can handle (i.e. no DATETIME intervals). - Didn't check NULL value handling yet.
-
- 11 Mar, 2016 3 commits
-
-
Sergei Petrunia authored
-
Sergei Petrunia authored
Also added win_bit.result (result values checked)
-
Sergei Petrunia authored
Part#2: Fix a couple more issues in rows-type frames. This also has a code cleanup: - introduce a separate Frame_rows_current_row_(top,bottom). This is is a special case which doesn't need its cursor or partition bound check - Split Frame_n_rows into = Frame_n_rows_preceding (this one is now much simpler) = Frame_n_rows_following (simpler and works but may need some work still)
-
- 10 Mar, 2016 1 commit
-
-
Sergei Petrunia authored
Part#1: Frame_n_rows::next_partition() should not assume that the current table->record[0] points to the first row in the partition. Since cursor supports move_to() operation, we dont need this.
-
- 07 Mar, 2016 3 commits
-
-
Vicențiu Ciorbaru authored
The results for this test case are blocked by MDEV-9695.
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
-
- 06 Mar, 2016 2 commits
-
-
Sergei Petrunia authored
Add testcases for RANGE UNBOUNDED PRECEDING|FOLLOWING
-
Sergei Petrunia authored
Support RANGE ... CURRENT ROW as frame's first and second bound.
-
- 03 Mar, 2016 2 commits
-
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
-
- 02 Mar, 2016 3 commits
-
-
Sergei Petrunia authored
-
Sergei Petrunia authored
-
Sergei Petrunia authored
-
- 01 Mar, 2016 1 commit
-
-
Sergei Petrunia authored
Introduce explicitly-defined cursors. - Rowid_seq_cursor just reads the rowid sequence - Table_read_cursor also reads rows for the rowids - Also, we need a kind of cursor that stops at partition boundary?
-
- 27 Feb, 2016 1 commit
-
-
Sergei Petrunia authored
... into Frame_unbounded_preceding and Frame_unbounded_following
-
- 25 Feb, 2016 1 commit
-
-
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)
-
- 20 Feb, 2016 1 commit
-
-
Igor Babaev authored
Resolved window names. Checked some constraints for window frames. Added test cases for window name resolution.
-
- 17 Feb, 2016 1 commit
-
-
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.
-
- 15 Feb, 2016 5 commits
-
-
Vicențiu Ciorbaru authored
-
Vicențiu Ciorbaru authored
-
Sergei Petrunia authored
- Make queries that use multiple window functions not to leak memory - Code cleanup in sql_window.cc
-
Sergei Petrunia authored
-
Sergei Petrunia authored
These do not have any meaning after MDEV-8646. Their only valid values are - table_access_tabs= join_tab; - top_table_access_tabs_count= top_join_tab_count;
-