1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-18 21:44:02 +03:00

15 Commits

Author SHA1 Message Date
Sergey Zefirov
b53c231ca6 MCOL-271 empty strings should not be NULLs (#2794)
This patch improves handling of NULLs in textual fields in ColumnStore.
Previously empty strings were considered NULLs and it could be a problem
if data scheme allows for empty strings. It was also one of major
reasons of behavior difference between ColumnStore and other engines in
MariaDB family.

Also, this patch fixes some other bugs and incorrect behavior, for
example, incorrect comparison for "column <= ''" which evaluates to
constant True for all purposes before this patch.
2023-03-30 21:18:29 +03:00
Leonid Fedorov
3919c541ac
New warnfixes (#2254)
* Fix clang warnings

* Remove vim tab guides

* initialize variables

* 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length

* Fix ISO C++17 does not allow 'register' storage class specifier for outdated bison

* chars are unsigned on ARM, having  if (ival < 0) always false

* chars are unsigned by default on ARM and comparison with -1 if always true
2022-02-17 13:08:58 +03:00
Leonid Fedorov
04752ec546 clang format apply 2022-01-21 16:43:49 +00: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
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
Gagan Goel
6aea838360 MCOL-641 Add support for functions (Part 2). 2020-11-18 13:51:55 +00:00
Gagan Goel
cfe35b5c7f MCOL-641 Add support for functions (Part 1). 2020-11-18 13:51:25 +00:00
David Hall
881410d397 MCOL-174 fix compile errors 2019-08-22 16:39:02 -05:00
David Hall
81e745256b MCOL-174 Replace custom helpers::power() with standard pow(). helpers::power() breaks with #dec > 9 2019-07-31 14:49:31 -05:00
Andrew Hutchings
a127f84793 MCOL-1433 Fix TIME for MAKEDATE/TIMEDIFF
Fix saturation behaviour for TIME with MAKEDATE() and TIMEDIFF()
2018-10-04 16:53:14 +01:00
Andrew Hutchings
fb8aab959d MCOL-1433 Fix some functions for TIME
Fixes the following:

* CAST() (as DATE/DATETIME)
* DATE()
* DATE_FORMAT()
* MAKEDATE()
* NULLIF()
* TIMEDIFF()
* TO_DAYS() / DATEDIFF()
2018-07-12 15:13:43 +01:00
Andrew Hutchings
01446d1e22 Reformat all code to coding standard 2017-10-26 17:18:17 +01:00
Andrew Hutchings
28fe2c0b70 MCOL-664 Add function support for TEXT
For the initial BLOB/TEXT pull request we put them in the same bucket as
VARBINARY, forcing many functions to be disabled. This patch enables the
same TEXT function support as VARCHAR.
2017-04-15 07:22:05 +02:00
Andrew Hutchings
55844a0f0b Fix makedate() and year() functions
* The year() function did not handle float/double input correctly
* Makedate() did not handle year < 100 conversion
* 0 date was converted to NULL for some functions

In addition makedate did
2016-09-27 16:11:31 +01:00
david hill
f6afc42dd0 the begginning 2016-01-06 14:08:59 -06:00