You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
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
This commit is contained in:
@ -78,8 +78,15 @@ uint64_t makedate(rowgroup::Row& row,
|
||||
isNull = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (year < 1000 || year > 9999) {
|
||||
if (year < 70)
|
||||
{
|
||||
year = 2000 + year;
|
||||
}
|
||||
else if (year < 100)
|
||||
{
|
||||
year = 1900 + year;
|
||||
}
|
||||
else if (year < 1000 || year > 9999) {
|
||||
isNull = true;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user