1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-21 19:45:56 +03:00

171 Commits

Author SHA1 Message Date
Alexey Antipovsky
afef46cbc7
fix(PrimProc): MCOL-5651 Add a workaround to avoid choosing an incorrect TupleHashJoinStep as a joiner [develop-23.02] (#3330)
* fix(PrimProc): MCOL-5651 Add a workaround to avoid choosing an incorrect TupleHashJoinStep as a joiner
2024-11-08 17:43:18 +00:00
Aleksei Antipovskii
b124e8382e fix(dbcon) MCOL-5812 server crash related to stored functions
Using the stored function's return value as an argument
for another function was handled incorrectly, leading
to a server crash.
2024-11-05 20:33:04 +04:00
Leonid Fedorov
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
Sergey Zefirov
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
Serguey Zefirov
1935c9c1da MCOL-5625: Fixes json_query implementation
Also extends func_json_value.test.
2024-01-10 18:22:16 +04:00
Denis Khalikov
5f07828619 MCOL-5522 Properly process pm join result count.
This patch:
1. Properly processes situation when pm join result count is exceeded.
2. Adds session variable 'columnstore_max_pm_join_result_count` to control the limit.
2024-01-10 18:16:39 +04:00
Leonid Fedorov
134381d6b2 Fix tests, for 2020-11-11 12:12:12 quarter is 4 2023-06-02 13:31:03 +00:00
Gagan Goel
10f1a7abbc MCOL-5480 LOAD DATA INFILE incorrectly loads values for MEDIUMINT datatype.
Internal memory representation of MEDIUMINT datatype uses 24 bits. This is
true for both MariaDB server as well as ColumnStore. MCS plugin code uses
TypeHandlerSInt24 and TypeHandlerUInt24 classes to respectively convert the
binary representation of the signed and unsigned MEDIUMINT values passed by
the server to the plugin. The plugin then outputs the text representation
of these values into an open file descriptor which is piped to cpimport
for the final load into the MCS db files.

The TypeHandlerXInt24 classes were earlier incorrectly using
WriteBatchField::ColWriteBatchXInt32() functions which operate on a 4 byte
buffer. This resulted in incorrect parsing of MEDIUMINT values. As a fix,
we implement WriteBatchField::ColWriteBatchXInt24() functions which
correctly handle the 24 bit input buffer used for MEDIUMINT datatype.
2023-05-19 18:30:52 -04:00
Gagan Goel
982db10f10 MCOL-5357 Fix TPC-DS query error "MCS-3009: Unknown column '.<colname>'".
For the following query:

select item from (
select item from (select a as item from t1) tt
union all
select item from (select a as item from t1) tt
) ttt;

There is an if predicate in buildSimpleColFromDerivedTable() that compares
the outermost query field name (ttt.item) to the returned column list of
the inner query (tt.item) when building the returned column list of the
outer most query. In the above query example, the inner query field name
is an alias set in the inner most query and is set to "`tt`.`item`",
while the outermost query field name is set to "item". The use of
backticks "`" in the inner query alias is causing the execution to
not enter the if block which creates the SimpleColumn for the outermost
query field name. As a fix, we strip off the backticks from the inner
query alias.
2023-05-02 15:43:10 -04:00
Roman Nozdrin
7f3d540841
MCOL-5438 COUNT() in math causes SEGV (#2769)
Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
2023-03-10 19:32:17 +03:00
Leonid Fedorov
2f0ab915d1 mcs4011_autopilot_query_stats disabled for unstable response 2023-03-03 12:19:58 +03:00
Roman Nozdrin
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
Andrey Piskunov
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
Gagan Goel
157d0f9b8c MDEV-25080 Add --sorted_result MTR qualifier to some UNION tests. 2023-02-27 06:38:31 -05:00
Gagan Goel
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
Gagan Goel
e987a766e0 MDEV-25080 Some updates to the MDEV-25080 MTR test cases. 2023-02-27 06:38:31 -05:00
Gagan Goel
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
Gagan Goel
45a779f743 MDEV-25080 Implement ColumnStore-side changes for pushdown of SELECT_LEX_UNITs. 2023-02-27 06:38:31 -05:00
Andrey Piskunov
8671f55784
MCOL-5333: Full MTR tests for custom Build (#2732)
* Add MTR_SUITE_LIST

* Typo

* Add data download

* Install tar and lz4

* Change the way MTR_SUITE_LIST is set up

* Use bash for MTR_SUITE_LIST

* Another one

* Fix reference results for full MTR develop, disable broken JSON test and tests with 10GB database

* Fix timestamps and truncate cos

* Fix some more references

* Fix dokcerhub step for custom build

* One more fix for dockerhub step on custom build

* Fix tests for regr functions with truncate

* Full mtr set on nghtly + MTR_FULL_SET flag

* One more fix for dockerhub

* Fix MTR_FULL_SET

* Testing MTR_FULL_SET

* sorted_result in tests + fix typo

* Truncate even more

* Typo

* truncate 2 more tests

* Disable regr_* functions tests

* fix setup mtr step

* correct settings for table creation

* Put setup for tests into drone

* Fix for debian based distros

* More truncates

* Disable the rest

---------

Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com>
2023-02-27 13:42:48 +03:00
Denis Khalikov
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
mariadb-DanielLee
3da494e21b Create 'test' database in the MTR setup suite 2022-12-09 16:48:05 -06:00
root
2ed151fa59 Recorded reference results 2022-12-09 02:24:40 +00:00
root
f090e65298 More changes 2022-12-08 21:00:01 +00:00
mariadb-DanielLee
fad0fd08f0 Disable warnings for 'drop if exists' and 'create if not exist' commands 2022-12-08 11:37:44 -06:00
root
c0d772559e Moved one more test case to 1pmonly folder 2022-12-02 14:30:43 +00:00
root
945736cc1f Set batch insert flag to 'on'. Fixed a typo 2022-12-01 19:49:24 +00:00
root
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
root
740a2c8a6d Update mtr test case for 'show create table' output 2022-11-22 20:46:13 +00:00
Roman Nozdrin
09d785fc9b
MCOL-5279 This commit fixes the corner case of the issue that can rarely happen when flow control is used to backpressure PPs that overflows EM with Primitive messages. It also adds a relevant test that makes sense in a multi-node scenario only. (#2605)
Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
2022-11-03 16:36:54 -05:00
mariadb-AndreyPiskunov
8b4be1b7f9 func json_arrayagg test adjustments 2022-11-02 16:07:45 +02:00
mariadb-AndreyPiskunov
33b09f5499 Add truncate for result consistency 2022-10-31 20:38:08 +03:00
mariadb-AndreyPiskunov
d7f4ec73c5 Small fixes + test sorting 2022-10-31 14:56:32 +02:00
mariadb-AndreyPiskunov
315e4be2d8 First working attempt for json_arrayagg 2022-10-31 14:56:32 +02:00
mariadb-KirillPerov
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
Daniel Lee
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
Andrey Piskunov
f6aa95857c
Adjusting autopilot test results for MCOL-5188 (#2579) 2022-10-05 11:07:58 -05:00
mariadb-AndreyPiskunov
80a2d8e9f5 Add tests for window functions 2022-09-30 18:26:37 +03:00
Jigao Luo
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
Daniel Lee
e000236af7
Dlee json update (#2558)
* JSON functions have been implemented.  Updated MTR test cases
2022-09-07 13:42:29 -05:00
Ziy1-Tan
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
Daniel Lee
028f8e0924
Docker defaults character_set_database=utf8mb3, which would cause an ER_TOO_BIG_ROWSIZE for wide tables (#2533) 2022-08-24 23:50:24 -05:00
Sergey Zefirov
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
Roman Nozdrin
bbb3c69e31
Merge pull request #2517 from mariadb-corporation/dlee_mtr_cleanup_2208
Dlee mtr cleanup 2208
2022-08-22 15:26:52 +03:00
mariadb-DanielLee
54329d3ab8 Updated autopilot adn extended cases 2022-08-18 21:08:05 -05:00
Roman Nozdrin
4fc43c3c93
Merge pull request #2506 from mariadb-corporation/MCOL-5092-addendum
MCOL-5092 addendum modify moda() mtr tests with order by
2022-08-18 20:49:01 +03:00
root
471b8e3e09 Updated test case 2022-08-17 16:56:26 +00:00
mariadb-DanielLee
8166e0284f Disabled warnings and add drop table commands 2022-08-17 11:29:04 -05:00
mariadb-DanielLee
10a8d274cd Updated reference results to match that of innodb tables 2022-08-17 11:28:05 -05:00
Roman Nozdrin
0f2f0fc0ba
Merge pull request #2507 from denis0x0D/MCOL-4715
MCOL-4715 Mixed inner and outer joins with "null" filter for the table which is not involved into the outer join produces wrong results.
2022-08-17 18:50:43 +03:00
david.hall
5c62d96b71 MCOL-5092 Use sorted_result to get consistent results in mtr 2022-08-17 09:07:47 -05:00