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

127 Commits

Author SHA1 Message Date
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
a7cf88f2a5 Update mcs171_null_functions.test 2022-07-31 01:12:09 +03:00
23bb51c486 This patch temporary disables the tests to get CI green. 2022-07-27 09:32:44 +00: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
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
194f0e9d64 ci: new builds grid, parallel steps 2022-07-08 22:30:02 +02:00
7d955a0f85 This patch fixes changed errno brought by the recent 10.8 changes 2022-07-02 17:12:50 +03:00
c7e67aedd9 Renamed variables + removed server tests 2022-06-03 15:30:25 +03:00
66c69c7609 Welford's algorithm STD and VAR on window functions 2022-06-03 15:29:30 +03:00
c5fa27475d Welford algorithm for STD and VAR
Naive algorithm for calculating STD and VAR is subject to catastrophic
cancellation. A well-known Welford's algorithms is used instead.
2022-06-03 15:29:30 +03:00
f28e00c206 No repeating code in client_udfs + better test 2022-03-28 21:48:47 +03:00
876a66cbc3 Added crude tests for cal/mcs client UDFs 2022-03-28 21:48:47 +03:00
973e5024d8 MCOL-4957 Fix performance slowdown for processing TIMESTAMP columns.
Part 1:
 As part of MCOL-3776 to address synchronization issue while accessing
 the fTimeZone member of the Func class, mutex locks were added to the
 accessor and mutator methods. However, this slows down processing
 of TIMESTAMP columns in PrimProc significantly as all threads across
 all concurrently running queries would serialize on the mutex. This
 is because PrimProc only has a single global object for the functor
 class (class derived from Func in utils/funcexp/functor.h) for a given
 function name. To fix this problem:

   (1) We remove the fTimeZone as a member of the Func derived classes
   (hence removing the mutexes) and instead use the fOperationType
   member of the FunctionColumn class to propagate the timezone values
   down to the individual functor processing functions such as
   FunctionColumn::getStrVal(), FunctionColumn::getIntVal(), etc.

   (2) To achieve (1), a timezone member is added to the
   execplan::CalpontSystemCatalog::ColType class.

Part 2:
 Several functors in the Funcexp code call dataconvert::gmtSecToMySQLTime()
 and dataconvert::mySQLTimeToGmtSec() functions for conversion between seconds
 since unix epoch and broken-down representation. These functions in turn call
 the C library function localtime_r() which currently has a known bug of holding
 a global lock via a call to __tz_convert. This significantly reduces performance
 in multi-threaded applications where multiple threads concurrently call
 localtime_r(). More details on the bug:
   https://sourceware.org/bugzilla/show_bug.cgi?id=16145

 This bug in localtime_r() caused processing of the Functors in PrimProc to
 slowdown significantly since a query execution causes Functors code to be
 processed in a multi-threaded manner.

 As a fix, we remove the calls to localtime_r() from gmtSecToMySQLTime()
 and mySQLTimeToGmtSec() by performing the timezone-to-offset conversion
 (done in dataconvert::timeZoneToOffset()) during the execution plan
 creation in the plugin. Note that localtime_r() is only called when the
 time_zone system variable is set to "SYSTEM".

 This fix also required changing the timezone type from a std::string to
 a long across the system.
2022-02-14 14:12:27 -05:00
a31066ff0e MCOL-4871 This patch adds relevant tests 2021-12-17 17:41:07 +00:00
83c0c84aea This patch adds MTR's --sorted_result option to make the tests outputs deterministic (#2107) 2021-09-01 23:43:29 +03:00
d1ef83c0f4 MCOL-3741 dev Change mtr IDB-xxx error codes to MCS-xxxx 2021-08-10 12:01:36 -05:00
c16b0f6ad7 MCOL-4823 WHERE char_col<varchar_col returns a wrong result of a large table (#2060)
SCommand StrFilterCmd::duplicate() missed these two lines:

    filterCmd->leftColType = leftColType;
    filterCmd->rightColType = rightColType;

which exist in the parent's FilterCommand::duplicate().

Rewriting the code to avoid duplication by using more inherited
methods/constructors. This reduces the probability of similar bugs
in the future.
2021-08-03 11:53:05 +03:00
10cc1159a2 Merge pull request #2040 from tntnatbry/MCOL-641-move-mtr-tests
MCOL-641 Move MTR tests from future/ to basic/
2021-07-12 15:47:45 -05:00
78dbf3a7e1 MCOL-641 Move MTR tests from future/ to basic/ 2021-07-12 13:01:45 +00:00
3d557a2f1e Merge pull request #2044 from dhall-MariaDB/MCOL-3738
MCOL-3738 COUNT(DISTINCT) with multiple parms
2021-07-12 07:34:56 -04:00
69eec2cc0f MCOL-2044 Test sources made more resilient 2021-07-09 18:21:08 +03:00
76607be63a MCOL-3738 COUNT(DISTINCT) with multiple parms
Fixed regression
Added a few more mtr tests
2021-07-09 09:07:03 -05:00
9e0851e4cf MCOL-4766 ROLLBACK kept ranges changed inside rolled back transaction
Now ROLLBACK drops ranges to INVALID state which makes engine to rescan
blocks and discover correct ranges.
2021-07-07 18:16:56 +03:00
237cad347f MCOL-4758 Limit LONGTEXT and LONGBLOB to 16MB (#1995)
MCOL-4758 Limit LONGTEXT and LONGBLOB to 16MB

Also add the original test case from MCOL-3879.
2021-07-05 02:09:41 -04:00
a576981db0 MCOL-1205 Remove old tests.
This patch removes some tests which check `circular join` error.
2021-07-03 15:29:35 +03:00
0553093986 Merge pull request #2023 from dhall-MariaDB/MCOL-4789
MCOL-4789 mcs51_cpimport_select_from is not deterministic
2021-07-02 13:31:54 -05:00
1d5f309b8f MCOL-1205 Support queries with circular joins
This patch adds support for queries with circular joins.
Currently support added for inner joins only.
2021-07-02 18:37:07 +03:00
20d90c6293 MCOL-4789 mcs51_cpimport_select_from is not deterministic
Testing script was left in.
2021-07-02 09:21:31 -05:00
6dc356ed60 Merge pull request #1989 from denis0x0D/MCOL-4713
MCOL-4713 Analyze table implementation.
2021-07-02 16:17:07 +03:00
c20015a7b2 MCOL-4713 Analyze table implementation. 2021-07-02 12:37:12 +03:00
6ae64bc750 MCOL-4789 Make mcs51_cpimport_select_from deterministic 2021-07-01 16:29:37 -05:00
325bb6c9e0 Merge pull request #1986 from tntnatbry/MCOL-1482
MCOL-1482 An UPDATE operation on a non-ColumnStore table involving a cross-engine join
2021-07-01 14:25:32 +03:00
132146b9c8 Mcol 3738 Allow COUNT(DISTINCT to have multiple parms) (#2002)
* MCOL-3738 allow COUNT(DISTINCT) multiple parameters
Changes in the way tupleaggregatestep sets up the aggregate arrays.

* MCOL-3738 mtr test
2021-06-28 20:14:44 +03:00
49255f5cbd MCOL-1482 An UPDATE operation on a non-ColumnStore table involving a
cross-engine join with a ColumnStore table errors out.

ColumnStore cannot directly update a foreign table. We detect whether
a multi-table UPDATE operation is performed on a foreign table, if so,
do not create the select_handler and let the server execute the UPDATE
operation instead.
2021-06-25 15:27:54 +00:00
96f2a55eea Merge pull request #1970 from tntnatbry/MCOL-4525
MCOL-4525 Implement columnstore_select_handler=AUTO.
2021-06-14 10:43:34 +03:00
5155a08a67 Merge pull request #1987 from mariadb-corporation/bar-develop-MCOL-4700
MCOL-4700 Wrong result of a UNION for INT and INT UNSIGNED
2021-06-14 02:36:10 -04:00
67449418ed MCOL-4700 Wrong result of a UNION for INT and INT UNSIGNED 2021-06-11 19:31:51 +04:00
e3d8100150 MCOL-4525 Implement columnstore_select_handler=AUTO.
This feature allows a query execution to fallback to the server,
in case query execution using the select_handler (SH) fails. In case
of fallback, a warning message containing the original reason for
query failure using SH is generated.

To accomplish this task, SH execution is moved to an earlier step when
we create the SH in create_columnstore_select_handler(), instead of the
previous call to SH execution in ha_columnstore_select_handler::init_scan().
This requires some pre-requisite steps that occur in the server in
JOIN::optimize() and JOIN::exec() to be performed before starting SH execution.

In addition, missing test cases from MCOL-424 are also added to the MTR suite,
and the corresponding fix using disable_indices_for_CEJ() is reverted back
since the original fix now appears to be redundant.
2021-06-11 11:35:34 +00:00
d00ace2398 MCOL-4757 Empty set in SELECT * INFORMATION_SCHEMA.COLUMNSTORE_TABLES WHERE TABLE_NAME='t1' 2021-06-11 12:00:23 +04:00
3537c0d635 Merge pull request #1962 from tntnatbry/MCOL-4642
MCOL-4642 NOT IN subquery containing an isnull in the OR predicate crashes server.
2021-06-04 07:18:46 -04:00
a04ea450cd MCOL-4749 mcs247_from_unixtime_funtion fails if local time zone is not GMT 2021-06-04 11:53:46 +02:00
107e417715 Merge pull request #1967 from mariadb-corporation/bar-develop-MCOL-4748
MCOL-4748 mtr mcs229_data_compression_type fails without --extern
2021-06-04 09:03:44 +04:00
911a41f5be Merge pull request #1935 from tntnatbry/MCOL-4665
MCOL-4665 Move outer join to inner join conversion into the engine.
2021-06-03 16:05:58 +03:00