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

1222 Commits

Author SHA1 Message Date
David Hall
0eee6cfc62 MCOL-4643 reset valOut after UDAF evaluation 2021-03-26 16:09:15 -05:00
Alexander Barkov
c0b8445225 MCOL-4633 Remove duplicate code for DECIMAL to int64_t rounding conversion
Detailed change list:

- Splitting out the narrow part of "class Decimal" into a separate class TDecimal64

- Adding a method TDecimal64::toSInt64Round()

- Reusing the method TDecimal64::toSInt64Round() in:
   * Func_cast_signed::getIntVal()
   * Func_char::getStrVal()
   * Func_elt::getStrVal()
   * makedate()
   * Func_maketime::getStrVal()

   Note, reusing this method in Func_char::getStrVal() also fixed this bug:
     MCOL-4634 CHAR(negativeWideDecimal) is not like InnoDB
   because the old code handled negative wide decimal values
   in a wrong way.

- Adding a new class TDecimal128 for symmetry.
  Moving a few wide decimal methods and constexpr's from Decimal to TDecimal128.
  The new class TDecimal128 does not do much at this point yet.
  Later we should be able to use TDecimal128 vs TDecimal64 in templates.
2021-03-25 17:56:10 +04:00
Roman Nozdrin
65e0a69914 Merge pull request #1815 from benthompson15/MCOL-4554
MCOL-4554: use jemalloc provided by repo.
2021-03-23 16:02:06 +03:00
Gagan Goel
894ebced33 Merge pull request #1817 from mariadb-corporation/bar-develop-MCOL-4629
MCOL-4629 Add a helper method mcsv1_UDAF::toDouble()
2021-03-23 05:46:31 -04:00
Alexander Barkov
ca7a310309 MCOL-4629 Add a helper method mcsv1_UDAF::toDouble() 2021-03-23 13:23:48 +04:00
Alexander Barkov
765858bc5b MCOL-4498 LIKE is not collation aware 2021-03-22 20:42:01 +04:00
David Hall
13b7a794e4 MCOL-4620 Add charset to various RowGroup initializers
Specifically to operator+=
2021-03-19 16:57:54 -05:00
benthompson15
c74beb6178 MCOL-4554: use jemalloc provided by repo. 2021-03-18 12:35:16 -05:00
David Hall
af20387985 MCOL-4516 check for var_pop < 0
In some cases, because of rounding error, var_pop will evaluate to some value just less than 0. We check for this and force to round to 0.
2021-03-09 13:36:10 -06:00
Denis Khalikov
a2efa1efeb MCOL-4566: Extend CompressedDBFileHeader struct with new fields.
* This patch extends CompressedDBFileHeader struct with new fields:
  `fColumWidth`, `fColDataType`, which are necessary to rebuild extent map
  from the given file. Note: new fields do not change the memory
  layout of the struct, because the size is calculated as
  max(sizeof(CompressedDBFileHeader), HDR_BUF_LEN)).

* This patch changes API of some functions, by adding new function
  argument `colDataType` when needed, to be able to call `initHdr`
  function with colDataType value.
2021-03-05 22:15:34 +03:00
benthompson15
afa88866bb MCOL-4483: Fix and consolidate log files and cpimport logging. 2021-02-12 15:40:16 -06:00
Roman Nozdrin
229fd5d1bd Merge pull request #1756 from benthompson15/MCOL-4193-dev
MCOL-4193-dev
2021-02-12 22:41:29 +03:00
Alexander Barkov
69da915160 MCOL-4531 New string-to-decimal conversion implementation
This change fixes:

MCOL-4462 CAST(varchar_expr AS DECIMAL(M,N)) returns a wrong result
MCOL-4500 Bit functions processing throws internally trying to cast char into decimal representation
MCOL-4532 CAST(AS DECIMAL) returns a garbage for large values

Also, this change makes string-to-decimal conversion 5-10 times faster,
depending on exact data.
Performance implemenent is achieved by the fact that (unlike in the old
implementation), the new version does not do any "string" object copying.
2021-02-09 13:02:27 +04:00
benthompson15
846f7fb29b MCOL-4193: Delete unused OAM and applications, ProcMon, ProcMgr, and no longer build all tools for packages 2021-02-08 17:51:09 -06:00
Roman Nozdrin
6f9cc0a067 MCOL-4486 Removing deadlock implicitly introduced by the deprecated class boost::condition 2021-02-04 15:39:02 +00:00
Roman Nozdrin
7277299628 Merge pull request #1742 from mariadb-AlexeyAntipovsky/MCOL-4031-dev
MCOL-4031 More accurate memory usage counting while sorting
2021-02-01 17:05:45 +03:00
zhaorenhai
0ccf3a28e3 MCOL-4511 __float128 type is not supported on aarch64
long double is 128 bit on aarch64,  even if it is soft supported,
not hardware instrunction supported.
So, here we just use long double on aarch64.
2021-01-30 16:11:03 +08:00
Alexey Antipovsky
5080e1ae53 MCOL-4031 More accurate memory usage counting while sorting 2021-01-29 18:31:20 +03:00
Roman Nozdrin
688ba9b544 Merge pull request #1732 from drrtuy/remove-lquadmath
Removing libquadmath from the list of the libraries to link against
2021-01-22 14:39:35 +03:00
Roman Nozdrin
25f54c54f5 Merge pull request #1731 from zhaorenhai/MCOL-4510
MCOL-4510 thrift code need to be upgraded to support aarch64
2021-01-22 11:05:54 +03:00
Roman Nozdrin
6af270606e Removing libquadmath from the list of the libraries to link against 2021-01-22 07:52:38 +00:00
zhaorenhai
a975b69811 MCOL-4510 thrift code need to be upgraded to support aarch64
code is from https://bugzilla.redhat.com/show_bug.cgi?id=1273830
2021-01-22 14:10:48 +08:00
Alexander Barkov
a687df48b9 MCOL-4065 DISTINCT is case sensitive
This patch makes DISTINCT and GROUP BY collation aware.
2021-01-21 15:46:54 +04:00
benthompson15
ef1268b5a2 Merge pull request #1713 from dhall-MariaDB/MCOL-4472-dev
MCOL-4472 Fix up floor() for the new format MariaDB 10.5
2021-01-19 13:32:13 -06:00
Roman Nozdrin
5fce19df0a MCOL-4412 Introduce TypeHandler::getEmptyValueForType to return const ptr for an empty value
WE changes for SQL DML and DDL operations

Changes for bulk operations

Changes for scanning operations

Cleanup
2021-01-18 12:30:17 +00:00
Alexander Barkov
b8cfda3bda A cleanup for MCOL-4464 Bitwise operations not like in MariaDB
CI with RelWithDebInfo builds revealed a problem in the main
patch for MCOL-4464, which did not show up with Debug builds.

Methods like:
- getDoubleVal()
- getDateIntVal()
- getDatetimeIntVal()
- getTimestampIntVal()
- getTimeIntVal()
- getUintVal()
- getIntVal()
- getStrVal()
require the caller to initialize the isNull argument to false.
This fact was not taken into account in MCOL-4464.

Adding proper initializations.
2021-01-13 16:51:38 +04:00
Alexander Barkov
09f937693f MCOL-4454 "ORDER BY BINARY a" is not like in InnoDB 2021-01-12 12:33:44 +04:00
Alexander Barkov
4abbe90302 MCOL-4464 Bitwise operations not like in MariaDB 2021-01-11 14:14:34 +04:00
David Hall
6e41b41637 MCOL-4472 Fix up floor() for the new format MariaDB 10.5
In 105, MariaDB expects a new format from floor()
2021-01-08 15:00:31 -06:00
Roman Nozdrin
0e6778378d Merge pull request #1705 from drrtuy/MCOL-4478
MCOL-4478 MCS now rounds the last digit of an avg() result
2021-01-06 15:30:34 +03:00
Roman Nozdrin
c7190a9856 Merge pull request #1706 from drrtuy/MCOL-4479
MCOL-4479 Imported couple functions from boost::math to remove libqua…
2020-12-30 18:42:27 +03:00
Roman Nozdrin
5b9689ce55 MCOL-4478 MCS now rounds the last digits of an avg() result for wide-DECIMAL argument 2020-12-30 15:02:12 +00:00
Roman Nozdrin
aa5211f192 MCOL-4479 Imported couple functions from boost::math to remove libquadmath dependency 2020-12-30 10:34:50 +00:00
Roman Nozdrin
e4bb7625f1 Merge pull request #1697 from drrtuy/MCOL-4470
MCOL-4470 Fix the crash in collation aware JOIN code
2020-12-29 10:54:23 +03:00
Roman Nozdrin
13e160ec2b MCOL-4470 Fix the crash in collation aware JOIN code 2020-12-24 14:28:09 +00:00
Roman Nozdrin
b0f97611fc Merge pull request #1691 from drrtuy/MCOL-4465_MCOL-4466_MCOL-4452
Mcol 4465 mcol 4466 mcol 4452
2020-12-23 16:28:40 +03:00
Roman Nozdrin
2c36eedb2b MCOL-4466 regr_count() and distinct_count() now use long long for counters and for a type cast to/from boost::any 2020-12-22 15:53:06 +00:00
Roman Nozdrin
5815c5c526 MCOL-4452 RowAggregationUMP2::doUDAF() now calls setUserData() using a correct UDAF context 2020-12-22 15:43:51 +00:00
Roman Nozdrin
bfe90be3db Merge pull request #1677 from tntnatbry/MCOL-4177-2
MCOL-4177 Add support for bulk insertion for wide decimals.
2020-12-18 12:37:23 +03:00
benthompson15
0a9fc0550f Merge pull request #1688 from dhall-MariaDB/MCOL-4319-dev
MCOL-4319 add logrotate for cpimport logs
2020-12-17 09:51:12 -06:00
David Hall
eae1d913c0 MCOL-4319 add logrotate for cpimport logs 2020-12-16 16:39:17 -06:00
David Hall
d35002fb65 MCOL-4263 return int for func_floor on datetime
For TIMESTAMP, it should do similar. However, it didn't work. For some reason, MDB has the function set as DATETIME, which for cs, isn't the same thing. Added a kludge to ha_mcs_execplan.cpp to handle it.
2020-12-16 16:23:21 -06:00
Gagan Goel
f6b55c1e18 MCOL-4177 Add support for bulk insertion for wide decimals.
1. This patch adds support for wide decimals with/without scale
     to cpimport. In addition, INSERT ... SELECT and LDI are also
     now supported.
  2. Logic to compute the number of bytes to convert a binary
     representation in the buffer to a narrow decimal is also
     simplified.
2020-12-15 22:14:54 +00:00
Alexander Barkov
a433c65575 A cleanup for MCOL-4064 Make JOIN collation aware
After creating and populating tables with CHAR(5) case insensitive columns,
in a set of consequent joins like:

select * from t1, t2 where t1.c1=t2.c1;
select * from t1, t2 where t1.c1=t2.c2;
select * from t1, t2 where t1.c2=t2.c1;
select * from t1, t2 where t1.c2=t2.c2;

only the first join worked reliably case insensitively.

Removing the remaining pieces of the code that used order_swap() to compare
short CHAR columns, and using Charset::strnncollsp() instead.
This fixes the issue.
2020-12-10 19:19:36 +04:00
Alexander Barkov
b08d719593 A cleanup for MCOL-4064 Make JOIN collation aware
A non-JOIN condition like `WHERE c1=c2` (with c1 and c2 being columns of the
same table) was not collation-aware yet after the main patches for MCOL-4064.

Additionally fixing StrFilterCmd::compare*() to address this.
2020-12-08 16:43:07 +04:00
Roman Nozdrin
069b74563f Move Functor::timeZone() call that utilizes a lock into a block where
timezone is really used
2020-12-07 14:35:30 +00:00
Roman Nozdrin
6b13fbc210 Merge pull request #1650 from mariadb-corporation/develop-bar-strings
Develop bar strings
2020-12-04 12:05:11 +03:00
Roman Nozdrin
dd8289d4fd Merge pull request #1619 from tntnatbry/MCOL-4188-bps-wf-fix
MCOL-4188 Regression fixes for MCOL-641.
2020-12-04 08:16:34 +03:00
Alexander Barkov
c6158eee31 Part#1 MCOL-4064 Make JOIN collation aware
Making field1=field2 collation aware for long CHAR/VARCHAR.
2020-12-04 08:41:26 +04:00
Alexander Barkov
52c5af054a Part#2 MCOL-495 Make string comparison not case sensitive
Fixing field='str' for short (non-Dict) CHAR and VARCHAR data types.
2020-12-04 08:40:29 +04:00