Roman Nozdrin
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
Gagan Goel
820703d2d0
Merge pull request #1568 from dhall-MariaDB/MCOL-4255-dev
...
MCOL-4255 dev fix ROUND(datecolumn)
2020-11-19 18:19:07 -05:00
David Hall
1b7fea9a12
MCOL-4255 dev fix ROUND(datecolumn)
...
The behavior of Server changed
2020-11-19 17:10:40 -06:00
Roman Nozdrin
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
Roman Nozdrin
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
Roman Nozdrin
58495d0d2f
MCOL-4387 Convert dataconvert::decimalToString() into VDecimal and TSInt128 methods
2020-11-18 13:53:16 +00:00
Gagan Goel
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
Gagan Goel
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
Alexander Barkov
3d7f5c6fd1
MCOL-4377 Split DataConvert::convertColumnData()
2020-11-18 13:53:16 +00:00
Roman Nozdrin
c00daa93bd
MCOL-4172 MultiDistinctRowAggregation didn't honor multiple UDAF in projection
...
::doUDAF() doesn't crash anymore trying to access fRGContextColl[] elements
that doesn't exist running RowAggregationMultiDistinct::doAggregate()
2020-11-18 13:53:15 +00:00
Roman Nozdrin
15b1bfa709
Fix fallthrough compilation warnings
2020-11-18 13:53:15 +00:00
Roman Nozdrin
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
Alexander Barkov
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
Alexander Barkov
129d5b5a0f
MCOL-4174 Review/refactor frontend/connector code
2020-11-18 13:53:15 +00:00
Gagan Goel
68244ab957
MCOL-641 Fix regression in aggregate distinct on narrow decimal.
...
The else if block in Row::equals() was incorrectly getting triggered
for narrow decimals earlier. We now specifically check if the column
is a wide decimal. Furthermore, we need to dereference the int128_t
pointers for equality comparison.
2020-11-18 13:52:20 +00:00
Roman Nozdrin
844472d812
MCOL-4313 Very fragile but high speed approach with inline ASM
...
GCC compiler uses aligned versions of SIMD instructions expecting
aligned memory blocks that is hard to implement now
2020-11-18 13:52:20 +00:00
Roman Nozdrin
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
Roman Nozdrin
f7002e20b5
::writeRow now treats WR_BINARY as int128 for 16 bytes DT only
...
WF avg uses const & as arguments types
Removed BINARY from DDL parser
2020-11-18 13:52:20 +00:00
Roman Nozdrin
1c3a34a3d0
Dataconvert::decimalToString badly fails w/o 20th member of mcs_pow_10 so I returned it
...
WF::percentile runtime threw an exception b/c of wrong DT deduced from its argument
Replaced literals with constants
Tought WF_sum_avg::checkSumLimit to use refs instead of values
2020-11-18 13:52:20 +00:00
David Hall
af80081c94
MCOL-4171 Some fixes
2020-11-18 13:52:20 +00:00
David Hall
5b8aba0005
MCOL-4171 use const ref when passing int128
...
It saves a pico second or two.
2020-11-18 13:52:20 +00:00
David Hall
2d044fd7f1
MCOL-4171 Fix comments in bytestream.h
2020-11-18 13:52:19 +00:00
David Hall
c4d8516a47
MCOL-4171 Window functions with decimal(38)
2020-11-18 13:52:19 +00:00
Roman Nozdrin
1588ebe439
MCOL-641 Clean up primitives code
...
Add int128_t support into ByteStream
Fixed UTs broken after collation patch
2020-11-18 13:52:19 +00:00
David Hall
638202417f
MCOL-4171
2020-11-18 13:52:19 +00:00
Gagan Goel
d3bc68b02f
MCOL-641 Refactor initial extent elimination support.
...
This commit also adds support in TupleHashJoinStep::forwardCPData,
although we currently do not support wide decimals as join keys.
Row estimation to determine large-side of the join is also updated.
2020-11-18 13:52:19 +00:00
Gagan Goel
6aea838360
MCOL-641 Add support for functions (Part 2).
2020-11-18 13:51:55 +00:00
Roman Nozdrin
bd0d5af123
Merge fixes.
2020-11-18 13:51:26 +00:00
Roman Nozdrin
17bad9eb0b
MCOL-641 Initial support for ORDER BY on wide DECIMALs.
2020-11-18 13:51:26 +00:00
Roman Nozdrin
eeebe83839
MCOL-641 Fixed the incorrect if-condition.
2020-11-18 13:51:26 +00:00
Roman Nozdrin
51d77d74df
MCOL-641 Fix for GROUP BY on wide-DECIMALs.
2020-11-18 13:51:26 +00:00
Roman Nozdrin
a7fcf39f2a
MCOL-641 Fixed group_concat for narrow-DECIMALs.
2020-11-18 13:51:26 +00:00
Roman Nozdrin
f63611c422
MCOL-641 This commit adds support for group_concat w/o ORDER BY.
...
Small refactoring in Row methods.
2020-11-18 13:51:26 +00:00
Roman Nozdrin
21a41738e1
MCOL-641 Simple aggregates works with GROUP BY column keys.
...
Fixed constant colump copy for binary columns in TNS.
2020-11-18 13:51:26 +00:00
Roman Nozdrin
e88cbe9bc1
MCOL-641 Simple aggregates support: min, max, sum, avg for wide-DECIMALs.
2020-11-18 13:51:25 +00:00
Roman Nozdrin
3d94ec1568
MCOL-641 Followup on functions commit.
2020-11-18 13:51:25 +00:00
Gagan Goel
cfe35b5c7f
MCOL-641 Add support for functions (Part 1).
2020-11-18 13:51:25 +00:00
Gagan Goel
74b64eb4f1
MCOL-641 1. Add support for int128_t in ParsedColumnFilter.
...
2. Set Decimal precision in SimpleColumn::evaluate().
3. Add support for int128_t in ConstantColumn.
4. Set IDB_Decimal::s128Value in buildDecimalColumn().
5. Use width 16 as first if predicate for branching based on decimal width.
2020-11-18 13:47:45 +00:00
Roman Nozdrin
b09f3088ca
MCOL-641 Initial version of Math operations for wide decimal.
2020-11-18 13:47:44 +00:00
Gagan Goel
62d0c82d75
MCOL-641 1. Templatized convertValueNum() function.
...
2. Allocate int128_t buffers in batchprimitiveprocessor if
a query involves wide decimal columns.
2020-11-18 13:47:44 +00:00
Gagan Goel
9b714274db
MCOL-641 1. Minor refactoring of decimalToString for int128_t.
...
2. Update unit tests for decimalToString.
3. Allow support for wide decimal in TupleConstantStep::fillInConstants().
2020-11-18 13:47:44 +00:00
Roman Nozdrin
2e8e7d52c3
Renamed datatypes/decimal.* into csdecimal to avoid collision with MDB.
2020-11-18 13:47:44 +00:00
Roman Nozdrin
238386bf63
MCOL-641 Replaced IDB_Decima.__v union with int128_t attribute.
...
Moved all tests into ./test
Introduced ./datatypes directory
2020-11-18 13:47:44 +00:00
Gagan Goel
824615a55b
MCOL-641 Refactor empty value implementation in writeengine.
2020-11-18 13:47:44 +00:00
Roman Nozdrin
97ee1609b2
MCOL-641 Replaced NULL binary constants.
...
DataConvert::decimalToString, toString, writeIntPart, writeFractionalPart are not templates anymore.
2020-11-18 13:47:44 +00:00
Roman Nozdrin
61647c1f5b
MCOL-641 DataConvert::decimalToString() refactoring.
2020-11-18 13:47:02 +00:00
Gagan Goel
8f80c1dee6
MCOL-641 1. Implement int128 version of strtoll.
...
2. Templatize number_int_value.
3. Add test cases for strtoll128 and number_int_value for Decimal38.
2020-11-18 13:47:02 +00:00
drrtuy
b29d0c9daa
MCOL-641 Changed the hint to search for GTest headers.
...
This commit introduces DataConvert UTs.
DataConvert::decimalToString now can negative values.
Next version for Row::toString(), applyMapping UT checks.
Row:equals() is now wide-DECIMAL aware.
2020-11-18 13:47:02 +00:00
Roman Nozdrin
c23ead2703
MCOL-641 This commit changes NULL and EMPTY values.
...
It also contains the refactored DataConvert::decimalToString().
Row::toString UT is finished.
2020-11-18 13:47:02 +00:00
Roman Nozdrin
de85e21c38
MCOL-641 This commit cleans up Row methods and adds couple UT for Row.
2020-11-18 13:47:02 +00:00