- 28 Mar, 2016 4 commits
-
-
Vicențiu Ciorbaru authored
Also fixed a bug in row_counts detection, when partition changes.
-
Vicențiu Ciorbaru authored
The percent_rank function now is compatible with the cursor algorithm. We no longer need a special implementation for it to work.
-
Vicențiu Ciorbaru authored
Instead of relying solely on top bound and bottom bound cursors, now we create a list of cursors that are iterated over.
-
Sergei Petrunia authored
- Make EXPLAIN code use the post-join operations - Remove Sort_and_group_tracker that was used for that purpose
-
- 27 Mar, 2016 5 commits
-
-
Sergei Petrunia authored
-
Sergei Petrunia authored
We can call setup_partition_border_check() from JOIN::make_aggr_tables_info(), provided that call is made after appropriate set_items_ref_array() call.
-
Sergei Petrunia authored
-
Sergei Petrunia authored
gbh != NULL is handled in a separate branch above, we don't get into this part of code when gbh!=NULL
-
Sergei Petrunia authored
Added class Window_funcs_computation, with setup() method to setup execution, and exec() to run window function computation. setup() is currently trivial. In the future, it is expected to optimize the number of sorting operations and passes that are done over the temp. table.
-
- 24 Mar, 2016 2 commits
-
-
Sergei Petrunia authored
-
Sergei Petrunia authored
-
- 23 Mar, 2016 5 commits
-
-
Sergei Petrunia authored
-
Sergei Petrunia authored
-
Igor Babaev authored
-
Igor Babaev authored
Item_func_or_sum. Implemented method update_used_tables for class Item_findow_func. Added the flag Item::with_window_func. Made sure that window functions could be used only in SELECT list and ORDER BY clause. Added test cases that checked different illegal placements of window functions.
-
Sergei Petrunia authored
- Make Item_XXX::cleanup() clean List<Cached_item> orderby_fields. (Items survive across PS re-executions. Cached_item don't, because they keep pointers to fix_field'ed items, etc) - Move List<Cached_item> out into Group_bound_tracker.
-
- 22 Mar, 2016 1 commit
-
-
Igor Babaev authored
Item_func_or_sum. Implemented method update_used_tables for class Item_findow_func. Added the flag Item::with_window_func. Made sure that window functions could be used only in SELECT list and ORDER BY clause. Added test cases that checked different illegal placements of window functions.
-
- 18 Mar, 2016 3 commits
-
-
Igor Babaev authored
-
Sergei Petrunia authored
Produce a "not supported" error if one attempts to exclude rows
-
Igor Babaev authored
window frames in full accordance with the SQL standard.
-
- 17 Mar, 2016 7 commits
-
-
Igor Babaev authored
-
Igor Babaev authored
Each window name has to be resolved only once.
-
Sergei Petrunia authored
Don't attempt to do query pushdown when all tables have been optimized away (tables_list=NULL)>
-
Sergei Petrunia authored
-
Sergei Petrunia authored
-
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 1 commit
-
-
Sergei Petrunia authored
-