[MCOL-5503] Extract quarter is broken Created: 2023-06-01  Updated: 2023-06-23  Resolved: 2023-06-09

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: 23.02.4

Type: Bug Priority: Major
Reporter: Leonid Fedorov Assignee: Leonid Fedorov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Issue split
split from MCOL-5494 Retest Bugs, reported with included d... Closed

 Description   

MariaDB [mytest]> create table t1 (c1 datetime) engine=columnstore;

Query OK, 0 rows affected (0.128 sec)

MariaDB [mytest]> insert into t1 values ('2000-01-15 17:00:00.000000'),('2000-04-16 08:08:08.000000'),('2000-07-15 08:08:08.000000'),('2004-11-13 17:00:00.000000');

Query OK, 4 rows affected (0.191 sec)

Records: 4 Duplicates: 0 Warnings: 0

MariaDB [mytest]> select c1, extract(quarter from c1) from t1;

---------------------------------------------+

c1 extract(quarter from c1)

---------------------------------------------+

2000-01-15 17:00:00 1
2000-04-16 08:08:08 2
2000-07-15 08:08:08 2
2004-11-13 17:00:00 3

---------------------------------------------+

4 rows in set (0.090 sec)



 Comments   
Comment by Daniel Lee (Inactive) [ 2023-06-09 ]

Build verified: develop-23.02 branch

engine: 727170dc6629dc3b9fe266039e8764bf20138c3a
server: 805750b3a90ed4aecbf475025e63674aaab7f7f7
buildNo: 7945

MariaDB [mytest]> create table t1 (c1 datetime) engine=columnstore;
Query OK, 0 rows affected (0.207 sec)

MariaDB [mytest]> insert into t1 values ('2000-01-15 17:00:00.000000'),('2000-04-16 08:08:08.000000'),('2000-07-15 08:08:08.000000'),('2004-11-13 17:00:00.000000');
Query OK, 4 rows affected (0.174 sec)
Records: 4 Duplicates: 0 Warnings: 0

MariaDB [mytest]> select c1, extract(quarter from c1) from t1;
---------------------------------------------+

c1 extract(quarter from c1)

---------------------------------------------+

2000-01-15 17:00:00 1
2000-04-16 08:08:08 2
2000-07-15 08:08:08 3
2004-11-13 17:00:00 4

---------------------------------------------+
4 rows in set (0.103 sec)

Generated at Thu Feb 08 02:58:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.