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

229 Commits

Author SHA1 Message Date
Aleksei Antipovskii
70a7a01941 fix(dbcon): MCOL-4756: having not() provokes an ERROR 2013
The `NOT()` function in the HAVING clause was handled
    incorrectly, which caused the server to crash.
2024-07-31 16:33:34 +04:00
Alexander Presnyakov
f7ff055808 Added more tests 2024-07-30 23:13:38 +04:00
Alexander Presnyakov
5f9ccfa8a1 fix(mcol-4499): Correct handling of LIKE/NOT LIKE NULL 2024-07-30 23:13:38 +04:00
Leonid Fedorov
1d25cf3afd chore(codestyle): MCOL-5405: repace windows CRLF with virtious linux one 2024-07-26 18:01:35 +04:00
Serguey Zefirov
6e995e2e80 fix: MCOL-5755: incorrect handling of BLOB (and TEXT) in GROUP BY
BLOB fields did not work as grouping keys at all, they were assigned
value NULL for any value, be it NULL or not. The fix is in the
rowaggregation.cpp in the initMapping(), a switch/case branch was added
to handle BLOB field copying there.

Also, TEXT columns did not distinguish between NULL and empty string in
the grouping algorithm, now they do. The fix is in the equals()
function, now we specifically check for isNull() equality between
values.
2024-07-11 11:03:05 +03:00
Sergey Zefirov
f5089c7d80
fix(client): MCOL-5587: enable quick mode for predictable performance (#3240)
This changeset enables quick (mariadb -q) mode when columnstore is
installed. Quick mode precludes client CLI program from storing too
much data in memory, preventing out of memory conditions.
2024-07-07 13:52:21 +01:00
Alexander Presnyakov
57e2375dbc fix(funcexp): MCOL-4671 Fix behaviour of LEFT/RIGHT functions when negative trim length value is passedB 2024-07-04 12:51:01 +04:00
Leonid Fedorov
a1e64d4cb0 bug(priproc) make last_day type a bit more accurate
This fixes discrepance with the server, which assigns DATE type to
last_day()'s result.

Now we also assigns DATE result type and, also, use proper
dataconvert::Day data structure to return date.

Tests agree with InnoDB.

Also, this patch includes test for MCOL-5669, to show we fixed it.
2024-07-01 16:25:44 +03:00
Sergey Zefirov
7ec8f3df9a
MCOL-5772: incorrect ORDER BY ordering for a columns not in GROUP BY (#3214)
When ORDER BY column is not in GROUP BY, is not an aggregate and there
is a SELECT column that is also not an aggregate, there was a problem:
ordering happened on the SELECTed column, not ORDERed one.

This patch fixes that particular problem and also performs some tidying
around newly added aggregate.
2024-06-25 16:10:27 +04:00
Denis Khalikov
2444f96b11
Merge pull request #3202 from denis0x0D/MCOL-5708
MCOL-5708 Calculate precision and scale for constant decimal.
2024-06-24 11:16:58 +03:00
Sergey Zefirov
1122b64cb1
MCOL-4234: improve GROUP BY and ORDER BY interaction (#3194)
This patch fixes the problem in MCOL-4234 and also generally improves
behavior of GROUP BY.

It does so by introducing a "dummy" aggregate and by wrapping columns
into it. This allows for columns that are not in GROUP BY to be used
more freely, for example, in SELECT * FROM tbl GROUP BY col - all
columns that are not "col" will be wrapped into an aggregate and query
will proceed to execution.

The dummy aggregate itself does nothing more than remember last value
passed into it.

There also an additional error message that tries to explain what types
of expressions can be wrapped into an aggregate.
2024-06-17 20:00:54 +03:00
Denis Khalikov
b1045d27b6
fix(funcexp): MCOL-5237 Proper handle DATETIME column for "ifnull" function. (#3196) 2024-06-17 12:09:14 +01:00
drrtuy
113d9873a3
Containers memory limits for CI (#3108)
Limit test containers by memory, fix cgroup path inside the containers by introducing new ugly setting name 

---------

Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com>
2024-06-16 19:16:23 +04:00
Denis Khalikov
ccb7ba5914 MCOL-5708 Calculate precision and scale for constant decimal.
This patch calculates precision and scale for constant decimal
value for SUM aggregation function.
2024-06-11 15:48:46 +00:00
Sergey Zefirov
49541993f4
fix(join): Fixes MCOL-5056, an error of joining TEXT column from InnoDB (#3160)
We incorrectly identified TEXT columns from external tables as BLOB.
Alexander Barkov suggested a way to discriminate them which I
implemented here.
2024-05-15 16:04:10 +01:00
Sergey Zefirov
5b9ddd902e
feat(ddl): MCOL-5744: better handling of utf8 charset aliases (#3174)
Server expands ut8_XXX aliases to utf8mb3_XXX or utf8mb4_XXX depending
on the UTF8_IS_UTF8MB3 setting in the OLD_MODE environment variable.

Server already has the necessary code implemented in the get_utf8_flag()
method of class THD. There are several uses of this flag and all we have
to do to be in line with server is to use it.

This patch does that for DDL as work on MCOL-5705 uncovered some
problems in that area.
2024-05-10 17:17:57 +01:00
Leonid Fedorov
fe0f77a1a8 sorted mtr results 2024-04-18 18:31:30 +03:00
Leonid Fedorov
71185efe54 Fixed review notices, added the loop over selects, to collect error on more tnan two selects 2024-04-18 18:31:30 +03:00
Leonid Fedorov
904ac415e4 fix(plugin) MCOL-5699: throw error for unimplemented INTERSECT and EXCEPT 2024-04-18 18:31:30 +03:00
Leonid Fedorov
b79c34b90e Fix MTR mcol-5236 2024-04-16 17:06:26 +03:00
Serguey Zefirov
3b7e69135d Fixes MCOL-5700, Oracle mode test results
This changeset contains fixes in Oracle mode tests and for the
implementation of the CONCAT_ORACLE. Also, we harmonise our
translation process with the recent changes in the server.

Due to changed behavior of the server, some CREATE VIEW/EXPLAIN
statements' results begun to output unexpected results and need to be
fixed.

Also, concatenation operation's name also changed. This lead to
disabled func_concat_oracle test to be enabled to test it and it
turned out that our implementation of this function was broken
and need to be fixed too.
2024-04-15 19:35:21 +03:00
Susil Behera
28b957915d Add qa test for MCOL-5328 2024-04-12 11:10:50 +00:00
Denis Khalikov
77cd733a6d
fix(plugin): MCOL-5236 Take Item from Ref_Item for group by list. (#3162) 2024-04-01 14:13:39 +03:00
Leonid Fedorov
af5ae35413
Revert "Fixes MCOL-5700, Oracle mode test results" 2024-03-27 18:52:30 +04:00
mariadb-KirillPerov
56b35d5cf6
Merge pull request #3156 from mariadb-corporation/sz-fix-oracle-mode
Fixes MCOL-5700, Oracle mode test results
2024-03-27 14:45:52 +06:00
Serguey Zefirov
34acd3559b Fixes MCOL-5700, Oracle mode test results
This changeset contains fixes in Oracle mode tests and for the
implementation of the CONCAT_ORACLE. Also, we harmonise our
translation process with the recent changes in the server.

Due to changed behavior of the server, some CREATE VIEW/EXPLAIN
statements' results begun to output unexpected results and need to be
fixed.

Also, concatenation operation's name also changed. This lead to
disabled func_concat_oracle test to be enabled to test it and it
turned out that our implementation of this function was broken
and need to be fixed too.
2024-03-27 10:00:39 +03:00
Sergey Zefirov
49757ba8d5
Merge pull request #3132 from mariadb-SergeyZefirov/MCOL-5035-update-inserts-null-for-all-zeroes-date
Fix MCOL-5035, a difference in INSERT and UPDATE behavior
2024-03-21 10:12:18 +03:00
Leonid Fedorov
7a2ca9d6bc
MCOL-4480: TEXT type added (#3142)
* TEXT type added
* tests
2024-03-21 00:26:35 +04:00
Serguey Zefirov
5780bfa15f Fix MCOL-5035, a difference in INSERT and UPDATE behavior
The UPDATE statement wrote NULL when the column set is DATETIME and
value is '0000-00-00 00:00:00'. The problem was inside WriteEngine's
handling of UPDATE statements and this is where heart of change is.

Other changes are related to some obsolete data structures in DML/DDL
handling that just hanging around there, doing nothing.
2024-03-19 12:44:22 +03:00
Leonid Fedorov
5f40fb32d0
MCOL-5328: use PCRE2 and JPCRE wrapper (#3137)
PCRE2 for regexp functions in columnstore
2024-03-14 19:39:29 +04:00
mariadb-KirillPerov
3e73af331d
Update mcs50_cpimport_stdin.test 2024-02-26 20:31:34 +06:00
Leonid Fedorov
fadb102712 fix(writeengine) MCOL-4202: use schema name when renaming table and change it's fields in syscat 2023-12-18 09:59:38 +03:00
Serguey Zefirov
1f958c9ed2 MCOL-5625: Fixes json_query implementation
Also extends func_json_value.test.
2023-12-12 15:45:03 +03:00
Leonid Fedorov
7ea79ecc18 fix mtr according server updates 2023-12-07 00:29:41 +03:00
Denis Khalikov
9119f6f7b8
fix(aggregate): MCOL-5467 Add support for duplicate expressions in group by. (#3045)
This patch adds support for duplicate expressions (builtin_functions) with
one argument in select statement and group by statement.
2023-12-05 15:04:53 +03:00
Leonid Fedorov
6b8c3dd918 Fix arrow linkage on external project 2023-11-30 01:47:13 +04:00
HanpyBin
fe597ec78c MCOL-5505 add parquet support for cpimport and add mcs_parquet_ddl and mcs_parquet_gen tools 2023-11-30 01:47:13 +04:00
Serguey Zefirov
792aea2a7c Fixes MCOL-5599 where LIKE operator never finishes
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.
2023-11-29 19:17:16 +04:00
Sergey Zefirov
8632c85ecf
feat(primproc,aggregegation)!: Changes for ROLLUP with single-phase aggregation (#3025)
The fix is simple: enable subtotals in single-phase aggregation and
disable parallel processing when there are subtotals and aggregation is
single-phase.
2023-11-28 17:33:02 +03:00
Sergey Zefirov
9a84aa8d99
fix(plugin): Same columns fom different views in GROUP BY do not produce errors (#3035)
Fixes MCOL-5643.

The problem was that different views with same column names in GROUP BY
and on the SELECT clause produced an error about "projection column is
not an aggergate neither in GROUP BY list."

This was due to incorrect search in expressions's list that lead to
duplicate columns in GROUP BY list.
2023-11-28 17:30:56 +03:00
drrtuy
26f5f8fe5c
fix(plugin): this is to addres the original patch QA found in the original patch 2023-11-22 17:20:37 +03:00
Sergey Zefirov
5c9770d1e6
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.
2023-11-21 23:46:03 +03:00
Sergey Zefirov
69b8e1c779
feat(extent-elimination)!: re-enable extent-elimination for dictionary columns scanning
This is "productization" of an old code that would enable extent
elimination for dictionary columns.

This concrete patch enables it, fixes perfomance degradation (main
problem with old code) and also fixes incorrect behavior of cpimport.
2023-11-17 17:14:35 +03:00
Roman Nozdrin
f7045457f2 chore(datatypes): refactoring math ops results domain check functionality 2023-10-25 09:12:54 +00:00
Sergey Zefirov
84148cbe4c
fix(datatypes, funcexp): Overflow detection for MCOL-5568 use case (and some other) (#2987)
We add intermediate calculations in int128_t when target is UBIGINT and
check for overflow before converting into the UBIGINT. This is so
because we can overflow on addition and multiplication, with (some)
signed operands or both unsigned.
2023-10-16 16:55:02 +03:00
Sergey Zefirov
920607520c
feat(runtime)!: MCOL-678 A "GROUP BY ... WITH ROLLUP" support
Adds a special column which helps to differentiate data and rollups of
various depts and a simple logic to row aggregation to add processing of
subtotals.
2023-09-26 17:01:53 +03:00
Sergey Zefirov
4bfce51628
Fix autoincrement filtering problems with utf-8 (#2964)
MCOL-5572: Widen the autoincrement column to accomodate utf-8  encoded into weights with strnxfrm function.
2023-09-22 16:40:10 +03:00
Gagan Goel
931f2b36a1
MCOL-4931 Make cpimport charset-aware. (#2938)
1. Extend the following CalpontSystemCatalog member functions to
   set CalpontSystemCatalog::ColType::charsetNumber, after the
   system catalog update to add charset number to calpontsys.syscolumn
   in MCOL-5005:
     CalpontSystemCatalog::lookupOID
     CalpontSystemCatalog::colType
     CalpontSystemCatalog::columnRIDs
     CalpontSystemCatalog::getSchemaInfo

2. Update cpimport to use the CHARSET_INFO object associated with the
   charset number retrieved from the system catalog, for a
   dictionary/non-dictionary CHAR/VARCHAR/TEXT column, to truncate
   long strings that exceed the target column character length.

3. Add MTR test cases.
2023-09-05 17:17:20 +03:00
Denis Khalikov
add3a57e8d
MCOL-5539 Put table on small side if it was involved in prev.join. (#2945) 2023-09-05 12:19:43 +03:00
Andrey Piskunov
d586975da7
Rename a limit var + change error message (#2946)
* Rename a limit var + change error message

* Adjust the test
2023-09-05 12:19:15 +03:00