1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00
Commit Graph

1621 Commits

Author SHA1 Message Date
ba4190d200 MCOL-4463 Fix for BETWEEN() and wide DECIMAL columns 2020-12-18 14:55:32 +00:00
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
45197c49d1 Merge pull request #1678 from tntnatbry/MCOL-4180
MCOL-4180 Add some missing support for wide decimals to dbcon/execplan classes.
2020-12-18 12:27:07 +03:00
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
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
ed7811e161 MCOL-4180 Add some missing support for wide decimals to dbcon/execplan
classes.
2020-12-12 00:14:48 +00:00
a91fb15b07 Add PrimProc support for selective block loading for 16-byte columns. 2020-12-11 14:23:45 -05:00
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
b1d1ad1486 MCOL-2000 Fix CREATE TABLE syntax
for a generated replacement statements of original statements:
* `CREATE TABLE .. LIKE ..`
* `ALTER TABLE .. ENGINE=Columnstore`
* `CREATE TABLE .. AS ..`
2020-12-07 18:12:25 +03:00
667a6ded36 Merge pull request #1652 from mariadb-corporation/MCOL-2000-dev
MCOL-2000 Process charset definitions in the DDL
2020-12-04 19:15:27 +03:00
447cf9fc08 Merge pull request #1651 from drrtuy/fix_behavior_change
Fix for a behavior change + additional logging
2020-12-04 17:27:20 +03:00
160d243d6e Fix for a behavior change + additional logging 2020-12-04 13:00:59 +00:00
d2e7c9d98d MCOL-2000 Process charset definitions in the DDL
MCOL-2000 Process charset definitions in the ALTER TABLE .. ADD COLUMN

MCOL-2000 Yet another fixes for column charsets

* make respect for column (including table/db/server default) charsets
  for the TEXT(n) fields
* round TEXT(n) column length up to the next default length of TEXT-like
  subtypes, 255 (TINYTEXT), 65535 (TEXT) and so on up to 2100000000
  (LONGTEXT)
2020-12-04 15:01:01 +03:00
6b13fbc210 Merge pull request #1650 from mariadb-corporation/develop-bar-strings
Develop bar strings
2020-12-04 12:05:11 +03:00
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
3ffc936740 MCOL-4428 WHERE char6col <='STR' OR char6col IS NULL -- returns a wrong result after MCOL-495 2020-12-04 08:49:41 +04:00
03eac56d55 Part#2 MCOL-4064 Make JOIN collation aware
Making field1=field2 collation aware for short CHAR/VARCHAR.

Forcing typeless join if any of the sides is CHAR/VARCHAR,
no matter what width is.
2020-12-04 08:46:01 +04:00
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
0ff6a6ec20 Part#1 MCOL-495 Make string comparison not case sensitive
Fixing field='str' for long (Dict) string data types.
2020-12-04 07:49:00 +04:00
026c382d88 Merge pull request #1630 from benthompson15/MCOL-4323-dev
MCOL-4323: Encode / Decode - dev
2020-12-01 13:54:19 -06:00
4319dcf89f Merge pull request #1628 from dhall-MariaDB/MCOL-4105-dev
MCOL-4105 dev skip calpontsys tables
2020-12-01 13:10:13 -06:00
3e9b7b3401 Initial commit for Encode/Decode. 2020-12-01 12:39:56 -06:00
611ad780ef MCOL-4105 dev skip calpontsys tables
Procedure columnstore_upgrade trips table comments. This is not allowed for calpontsys tables.
2020-12-01 09:57:01 -06:00
a159f8a0b6 MCOL-4188 Regression fixes for MCOL-641.
1. Add wide decimal support to AggregateColumn::evaluate
and TreeNode::getDecimalVal().
2. Use the pm aggregate attributes to determine um aggregate
attributes in TupleAggregateStep::prep2PhasesAggregate.
2020-11-30 13:49:05 -05:00
aa64d81cde Merge pull request #1612 from tntnatbry/MCOL-4188-subquery-orderby-predicateop-fix-dev
MCOL-4188 Regression fixes for MCOL-641.
2020-11-30 17:17:20 +03:00
494bde61e1 MCOL-4409 Moved static Decimal conversion methods into VDecimal class
MCOL-4409 This patch combines VDecimal and Decimal and makes
IDB_Decimal an alias for the result class

MCOL-4409 More boilerplate reduction in Func_mod

Removed couple TSInt128::toType() methods
2020-11-30 12:08:52 +00:00
2ea73846b9 MCOL-4422 Remove mariadb.h and my_sys.h dependency from collation.h 2020-11-30 14:26:35 +04:00
785bc43435 MCOL-4188 Regression fixes for MCOL-641.
1. Make PredicateOperator::setOpType() function wide decimal aware.
  2. Added support for wide decimal in jlf_subquery.cpp::getColumnValue()
     used in scalar subqueries.
  3. Fixed the column index used for fetching wide decimal values from a Row
     when a wide decimal field is used in the order by clause.
2020-11-27 13:27:48 -05:00
9c18771b61 MCOL-4188 Regression fixes for MCOL-641.
1. In BatchPrimitiveProcessorJL::countThisMsg(), exit early if the
return code from primproc is non-zero.
2. For statistical window functions (stddev/var), properly handle
the case when there is only one value for the calculation.
2020-11-27 03:04:30 +00:00
454ec4be99 Merge pull request #1613 from tntnatbry/MCOL-641-alter-table-fix
MCOL-641 Fix alter table add wide decimal column.
2020-11-26 18:17:01 +03:00
c5d4a918ee MCOL-4188 Regression fixes for MCOL-641.
1. In TupleAggregateStep::configDeliveredRowGroup(), use
jobInfo.projectionCols instead of jobInfo.nonConstCols
for setting scale and precision if the source column is
wide decimal.

2. Tighten rules for wide decimal processing. Specifically:
  a. Replace (precision > INT64MAXPRECISION) checks with
     (precision > INT64MAXPRECISION && precision <= INT128MAXPRECISION)
  b. At places where (colWidth == MAXDECIMALWIDTH) is not enough to
     determine if a column is wide decimal or not, also add a check on
     type being DECIMAL/UDECIMAL.
2020-11-24 20:15:33 -05:00
995cadef2d MCOL-641 Fix alter table add wide decimal column.
This patch also removes CalpontSystemCatalog::BINARY and
ddlpackage::DDL_BINARY that were added during the initial
stages of the work on MCOL-641.
2020-11-20 19:49:54 -05:00
ba4156fe13 Merge pull request #1607 from drrtuy/MCOL-4394
MCOL-4394 __float128 related code had been moved into a separate file
2020-11-20 11:50:54 +03:00
61b55127ac A fix for MCOL-4174 Review/refactor frontend/connector code
- The code in ha_mcs_partition.cpp erroneously printed data
  to a temporary ostringstream "oss" instead of "output".

- The left-side adjustfield (applied when printing the range values)
  unintentionally disappeared during MCOL-4174 refactoring.
  Restoring left adjustfield in TypeHandler::PrintPartitionValue*().
2020-11-20 10:23:13 +04:00
8603c8f780 Merge pull request #1606 from dhall-MariaDB/MCOL-4397-dev
MCOL-4397 dev call refreshShm() for calshowpartitions
2020-11-19 17:02:25 -05:00
f742a55cd6 MCOL-4397 dev call refreshShm() for calshowpartitions 2020-11-19 13:49:10 -06:00
178be69bc4 MCOL-4394 __float128 related code had been moved into a separate file
Trim to double and to long double conversions for Decimal
2020-11-19 12:08:18 +00:00
aa44bca473 A pack of fixes for compilation errors and warnings for all platforms
Add libdatatypes.so into debian packaging
2020-11-19 10:21:45 +00:00
31e0909552 Merge for 13264feb7 that is the fix for multiple LDI issues described in MCOL-4320/4364/4370 2020-11-18 13:53:16 +00:00
58495d0d2f MCOL-4387 Convert dataconvert::decimalToString() into VDecimal and TSInt128 methods 2020-11-18 13:53:16 +00:00
007b8a5082 MCOL-4188 Fix regressions in CEIL()/CHAR() for narrow decimals.
In addition, a regression in a WHERE clause with a WF field
as the LHS and an addition operation on two WF fields on the RHS
is also fixed. The issue was SimpleColumn::getDecimalVal() was
setting precision = 19, with the value of one of the operands of the
addition operation being set in VDecimal::value instead of
VDecimal::s128Value. addSubtractExecute() in mcs_decimal.cpp makes the
assumption that if precision > 18 and precision <= 38, we need to
fetch the wide s128Value, not the narrow value field. So we are
fixing the precision set in SimpleColumn::getDecimalVal().
2020-11-18 13:53:16 +00:00
6fd7916c56 MCOL-4188 Fix regression in a union subquery involving a numeric field.
Since we now perform type promotion to wide decimals for aggregations
involving numeric fields, we need to check for wide decimal in
in and out ROWs and call the appropriate setter and getter functions.
2020-11-18 13:53:16 +00:00
3d7f5c6fd1 MCOL-4377 Split DataConvert::convertColumnData() 2020-11-18 13:53:16 +00:00
15b1bfa709 Fix fallthrough compilation warnings 2020-11-18 13:53:15 +00:00
3eb26c0d4a MCOL-4313 Introduced TSInt128 that is a storage class for int128
Removed uint128 from joblist/lbidlist.*

Another toString() method for wide-decimal that is EMPTY/NULL aware

Unified decimal processing in WF functions

Fixed a potential issue in EqualCompData::operator() for
    wide-decimal processing

Fixed some signedness warnings
2020-11-18 13:53:15 +00:00
d5c6645ba1 Adding mcs_basic_types.h
For now it consists of only:

using int128_t = __int128;
using uint128_t = unsigned __int128;

All new privitive data types should go into this file in the future.
2020-11-18 13:53:15 +00:00
129d5b5a0f MCOL-4174 Review/refactor frontend/connector code 2020-11-18 13:53:15 +00:00
1f4a781704 MCOL-641 Fixes for arithmetic operations.
1. Perform type promotion to wide decimal if the result
   of an arithmetic operation has a precision > 18.
2. Only set the decimal width of an arithmetic operation to wide
   if both the LHS and RHS of the operation are decimal types.
2020-11-18 13:52:20 +00:00
7d3d828790 MCOL-641 This commit fixes regression introduced by an earlier
commit for group_concat() on a narrow decimal field.
2020-11-18 13:52:20 +00:00
8de9764f84 MCOL-4172 Add support for wide-DECIMAL into statistical aggregate and regr_* UDAF functions
The patch fixes wrong results returned when multiple UDAF exist in projection

aggregate over wide decimal literals now works
2020-11-18 13:52:20 +00:00