1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-05 15:41:14 +03:00
Commit Graph

121 Commits

Author SHA1 Message Date
c46a0ab5f0 bug(funcexp): Fixes MCOL-5599 where LIKE operator never finishes (#3116)
This is a fix of logging subsystem, nothing else.

The old code expanded an argument into string and advanced too little
and, if expansion contained argument's index, it expanded it again. And
again.

Co-authored-by: Serguey Zefirov <serguey.zefirov@mariadb.com>
2024-02-05 18:31:57 +03:00
2eca3ee656 fix(funcexp): MCOL-5607: JSON function use crashes query execution (#3028)
JSON functions were implemented violating an assumption of their
pureness, as they should not have any state. This concrete patch
fixes implementation of JSON_VALUE function.
2024-01-10 14:51:28 +00:00
1935c9c1da MCOL-5625: Fixes json_query implementation
Also extends func_json_value.test.
2024-01-10 18:22:16 +04:00
134381d6b2 Fix tests, for 2020-11-11 12:12:12 quarter is 4 2023-06-02 13:31:03 +00:00
4d4e4ad30d Merge pull request #2741 from mariadb-corporation/MDEV-25080-CS-dev
MDEV-25080 Allow pushdown of queries involving UNIONs in outer select to ColumnStore
2023-02-28 11:23:50 +00:00
b6808c97f1 MCOL-4530: common conjuction top rewrite (#2673)
Added logical transformation of the execplan::ParseTrees with the taking out the common factor in expression of the form "(A and B) or (A and C)" for the purposes of passing a TPCH 19 query.

Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com>
2023-02-27 19:23:19 +03:00
157d0f9b8c MDEV-25080 Add --sorted_result MTR qualifier to some UNION tests. 2023-02-27 06:38:31 -05:00
2f1f9c0ef0 MDEV-25080 Some fixes:
1. In TupleUnion::writeNull(), add the missing switch case for
   wide decimal with 16bytes column width.
2. MCOL-5432 Disable complete/partial pushdown of UNION operation
   if the query involves an ORDER BY or a LIMIT clause, until
   MCOL-5222 is fixed. Also add MTR test cases for this.
2023-02-27 06:38:31 -05:00
e987a766e0 MDEV-25080 Some updates to the MDEV-25080 MTR test cases. 2023-02-27 06:38:31 -05:00
86dcf92d56 MCOL-5215 Fix overflow of UNION operation involving DECIMAL datatypes.
When a UNION operation involving DECIMAL datatypes with scale and digits
before the decimal exceeds the currently supported maximum precision
of 38, we throw an error to the user:
"MCS-2060: Union operation exceeds maximum DECIMAL precision of 38".

This is until MCOL-5417 is implemented where ColumnStore will have
full parity with MariaDB server in terms of maximum supported DECIMAL
precision and scale of 65 and 38 digits respectively.
2023-02-27 06:38:31 -05:00
45a779f743 MDEV-25080 Implement ColumnStore-side changes for pushdown of SELECT_LEX_UNITs. 2023-02-27 06:38:31 -05:00
242bc75166 MCOL-5195 Correlated subquery with equi/non-equi scalar filter and join condition
Disable check for correlated subqueries, basically those types of queries transforms
to join (aggr(table2), table1), table2) and post join scalar filter.
2022-12-23 18:33:01 +03:00
2ed151fa59 Recorded reference results 2022-12-09 02:24:40 +00:00
f090e65298 More changes 2022-12-08 21:00:01 +00:00
fad0fd08f0 Disable warnings for 'drop if exists' and 'create if not exist' commands 2022-12-08 11:37:44 -06:00
c0d772559e Moved one more test case to 1pmonly folder 2022-12-02 14:30:43 +00:00
814fc37081 Moved some MTR cases to a new 1pmonly directory. Also added order by clause to few cases 2022-11-30 23:40:41 +00:00
8b4be1b7f9 func json_arrayagg test adjustments 2022-11-02 16:07:45 +02:00
33b09f5499 Add truncate for result consistency 2022-10-31 20:38:08 +03:00
d7f4ec73c5 Small fixes + test sorting 2022-10-31 14:56:32 +02:00
315e4be2d8 First working attempt for json_arrayagg 2022-10-31 14:56:32 +02:00
85a6121f76 Mtrfix kp 220926 (#2580)
* Update mcol_2000.test

* Update mcs117_create_utf8.test

* Update mcs12_alter_table.test

* Update mcs13_alter_table_negative.test

* Update mcs169_bin_functions.test

* Update mcs171_null_functions.test

* Update mcs173_coalesce_function.test

* Update mcs174_case_function.test

* Update mcs175_convert_functions.test

* Update mcs176_if_function.test

* Update mcs178_adddate_function.test

* Update mcs179_addtime_function.test

* Update mcs180_ascii_function.test

* Update mcs181_between_and.test

* Update mcs182_char_length_function.test

* Update mcs183_date_function.test

* Update mcs184_day_function.test

* Update mcs185_dayname_function.test

* Update mcs186_dayofyear_function.test

* Update mcs187_dayofmonth_function.test

* Update mcs1_create_table_data_types.test

* Update mcs19_grant_revoke.test

* Update mcs229_data_compression_type.test

* Update mcs28_load_data_local_infile.test

* Update mcs2_create_table_valid_names.test

* Update mcs5_create_table_from_other_tables.test

* Update mcs74_check_constraint.test

* Update mcs7_create_table_with_metadata.test

* Update mcs87_alter_column.test

* Update mcs8_create_table_with_constraints.test

* Update disabled.def

* Update mcs19_grant_revoke.test

* Update mcs19_grant_revoke.test

* Update mcs19_grant_revoke.test
2022-10-07 11:36:29 +03:00
2606c91afd Dlee 22.08.2 updates (#2578)
* Sort test result so the test case would pass

* Server message has been changes

* Added schema name in query for rows in test case only.  Also use lower case schema name

* Changed database to lower case

* Run test case in its own database to avoid table already exists error

Co-authored-by: root <root@rocky8.localdomain>
2022-10-05 16:56:57 -05:00
80a2d8e9f5 Add tests for window functions 2022-09-30 18:26:37 +03:00
6c4af1461f [MCOL-5205] Fix bug from union type in UNION processing.
This patch fixs the reported JIRA issue MCOL 5205, which consists of a wrong union type from two input Int types. The bug results in wrong unioned answers in CS. The fix includes more INT case discussions. Additionaly, this patch provides detailed unit tests for correctness in UNION processing with Int.

Signed-off-by: Jigao Luo <luojigao@outlook.com>
2022-09-09 22:54:35 +02:00
cdd41f05f3 MCOL-785 Implement DISTRIBUTED JSON functions
The following functions are created:
Create function JSON_VALID and test cases
Create function JSON_DEPTH and test cases
Create function JSON_LENGTH and test cases
Create function JSON_EQUALS and test cases
Create function JSON_NORMALIZE and test cases
Create function JSON_TYPE and test cases
Create function JSON_OBJECT and test cases
Create function JSON_ARRAY and test cases
Create function JSON_KEYS and test cases
Create function JSON_EXISTS and test cases
Create function JSON_QUOTE/JSON_UNQUOTE and test cases
Create function JSON_COMPACT/DETAILED/LOOSE and test cases
Create function JSON_MERGE and test cases
Create function JSON_MERGE_PATCH and test cases
Create function JSON_VALUE and test cases
Create function JSON_QUERY and test cases
Create function JSON_CONTAINS and test cases
Create function JSON_ARRAY_APPEND and test cases
Create function JSON_ARRAY_INSERT and test cases
Create function JSON_INSERT/REPLACE/SET and test cases
Create function JSON_REMOVE and test cases
Create function JSON_CONTAINS_PATH and test cases
Create function JSON_OVERLAPS and test cases
Create function JSON_EXTRACT and test cases
Create function JSON_SEARCH and test cases

Note:
Some functions output differs from MDB because session variables that affects functions output,e.g JSON_QUOTE/JSON_UNQUOTE
This depends on MCOL-5212
2022-08-30 22:22:23 +08:00
50d95bf60a MCOL-5196 REPLACE function may trigger invalid capacity assertion (#2522)
When length of string to replace minus length of string to replace to is
bigger than input string and processing mode allows for binary (memcmp
or std::string::find()) comparison, REPLACE may trigger invalid capacity
assertion and query processing will stop.

The fix is to properly count the number of occurences of the string to
replace, basically.
2022-08-22 21:34:38 +03:00
5c62d96b71 MCOL-5092 Use sorted_result to get consistent results in mtr 2022-08-17 09:07:47 -05:00
5099133642 MCOL-5092 correct mtr result 2022-08-16 09:14:16 -05:00
05bdddf3a9 MCOL-5092 addendum modify moda() mtr tests with order by
fix an issue in moda() evaluate for string types
2022-08-15 15:50:15 -05:00
56bbef62e6 Merge pull request #2406 from tntnatbry/MCOL-5021-dev
MCOL-5021 AUX column implementation to improve DELETE performance.
2022-08-15 19:03:42 +03:00
2020f35e88 Mcol 5092 MODA uses wrong column width for some types (#2450)
* MCOL-5092 Ensure column width is correct for datatype
                       Change MODA return type to STRING
                       Modify MODA to handle every numeric type
* MCOL-5162 MODA to support char and varchar with collation support

Fixes to the aggregate bit functions
When we fixed the storage sign issue for MCOL-5092, it uncovered a problem in the bit aggregates (bit_and, bit_or and bit_xor). These aggregates should always return UBIGINT, but they relied on the type of the argument column, which gave bad results.
2022-08-11 15:16:11 -05:00
61cf18b92d [MCOL-5167] Add support for on clause filter for a table which is not involved in join.
This patch adds support for on clause filter for a table which is not involved in particular join
by disabling an `merge optimization` for those particular cases.
The `merge optimization` is optimization when CS
tries to create a one BPP join with one `large side` table and multiple `small sides` tables, in this
case we cannot apply a FE filter if this filter requires a columns from `small side` table which is not
involved in particular join.
2022-08-10 10:46:43 +00:00
0818b95caa MCOL-5021 Update MTR tests to reflect changes introduced by this feature. 2022-08-05 14:40:50 -04:00
d3bc6bf654 Update mcs78_aliases.test 2022-07-31 04:27:13 +03:00
22638de153 Update mcs78_aliases.test 2022-07-31 03:12:29 +03:00
e1199ea622 Update mcs78_aliases.result 2022-07-31 03:11:57 +03:00
5437ab0941 Update mcs171_null_functions.result 2022-07-31 01:13:10 +03:00
a7cf88f2a5 Update mcs171_null_functions.test 2022-07-31 01:12:09 +03:00
115c9db5e2 Merge pull request #2478 from drrtuy/temp-test-disable
This patch temporary disables the tests to get CI green.
2022-07-27 16:46:50 +03:00
23bb51c486 This patch temporary disables the tests to get CI green. 2022-07-27 09:32:44 +00:00
e519cd7486 [MCOL-5061] Fix wrong join id assignment for the views. (#2474)
This patch fixes a wrong `join id` assignment for `TupleHashJoinStep` in a view.
After MCOL-334 CS assigns a '-1' as `join id` for `TupleHashJoinStep` in a view, and
in this case we cannot apply a filter for specific `Join step`, which is associated with `join id`
for 2 reasons:
1. Filters for all `TupleHashJoinSteps` associated with the same `join id`, which is '-1'.
2. When CS creates a `joinIdIndexMap` it eliminates all `join ids` which a less or equal 0.

This patch also fixes some tests for the view, which were generated wrong results.
2022-07-25 20:02:02 +03:00
627a4b5819 Revert "Debug mtr 20220720 (#2470)" (#2473)
This reverts commit 8b8ee98fd2.

Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
2022-07-23 13:50:14 +03:00
8b8ee98fd2 Debug mtr 20220720 (#2470)
* Update udf_calshowpartitions.test

* Update mcs_named_udfs.test

* Update udf_calshowpartitions.result

* Update mcs_named_udfs.result
2022-07-22 20:42:22 +03:00
636e60b5f9 [MCOL-4699] Add support for circular outer joins. 2022-07-19 21:47:36 +03:00
7481f27343 Added order by clause to more queries 2022-07-12 09:49:24 -05:00
7ecf183af9 Added reference result files 2022-07-12 09:49:23 -05:00
ff20612a87 Added missing drop database statement 2022-07-12 09:49:23 -05:00
08ee2af4fa Avoid warning regarding undeterministic functions when binlog is enabled 2022-07-12 09:49:23 -05:00
7ebeee06e9 Need to add order by clause since different test run would return rows in different order 2022-07-12 09:49:23 -05:00