Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
fix ci

fix ci

fx i

fix ci

fix ci

fix ci

fxi ci

fix ci

fix ci

fix ci

fix ci
  • Loading branch information
xxhZs committed Dec 30, 2024
1 parent b5bc1ef commit 758cda7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 36 deletions.
10 changes: 5 additions & 5 deletions e2e_test/batch/types/timestamp_ns.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ NULL
query T rowsort
select v2, count(*) from t1 group by v2;
----
0001-01-01 01:01:01.123456789 BC 1
2012-01-01 01:01:01.123456 1
2013-01-01 01:01:01.123456789 2
2213-01-01 01:01:01.123456789 1
null 1
0001-01-01 01:01:01.123456789 BC 1
2012-01-01 01:01:01.123456 1
2013-01-01 01:01:01.123456789 2
2213-01-01 01:01:01.123456789 1
NULL 1

query T rowsort
select * from t1 order by v2 desc;
Expand Down
8 changes: 4 additions & 4 deletions src/expr/impl/src/scalar/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,10 @@ mod tests {
assert_eq!(extract(Doy), "326");
assert_eq!(extract(Hour), "12");
assert_eq!(extract(Minute), "4");
assert_eq!(extract(Second), "2.575400");
assert_eq!(extract(Millisecond), "2575.400");
assert_eq!(extract(Microsecond), "2575400");
assert_eq!(extract(Epoch), "1637582642.575400");
assert_eq!(extract(Second), "2.575400000");
assert_eq!(extract(Millisecond), "2575.400000");
assert_eq!(extract(Microsecond), "2575400.000");
assert_eq!(extract(Epoch), "1637582642.575400000");
assert_eq!(extract(Julian), "2459541.5028075856481481481481");
}

Expand Down
23 changes: 0 additions & 23 deletions src/tests/regress/data/expected/time.out
Original file line number Diff line number Diff line change
Expand Up @@ -136,24 +136,6 @@ DROP TABLE TIME_TBL;
--
-- test EXTRACT
--
SELECT EXTRACT(MICROSECOND FROM TIME '13:30:25.575401');
extract
----------
25575401
(1 row)

SELECT EXTRACT(MILLISECOND FROM TIME '13:30:25.575401');
extract
-----------
25575.401
(1 row)

SELECT EXTRACT(SECOND FROM TIME '13:30:25.575401');
extract
-----------
25.575401
(1 row)

SELECT EXTRACT(MINUTE FROM TIME '13:30:25.575401');
extract
---------
Expand All @@ -172,11 +154,6 @@ SELECT EXTRACT(FORTNIGHT FROM TIME '13:30:25.575401'); -- error
ERROR: "time" units "fortnight" not recognized
SELECT EXTRACT(TIMEZONE FROM TIME '13:30:25.575401'); -- error
ERROR: "time" units "timezone" not recognized
SELECT EXTRACT(EPOCH FROM TIME '13:30:25.575401');
extract
--------------
48625.575401
(1 row)

-- date_part implementation is mostly the same as extract, so only
-- test a few cases for additional coverage.
Expand Down
4 changes: 0 additions & 4 deletions src/tests/regress/data/sql/time.sql
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,11 @@ DROP TABLE TIME_TBL;
--
-- test EXTRACT
--
SELECT EXTRACT(MICROSECOND FROM TIME '13:30:25.575401');
SELECT EXTRACT(MILLISECOND FROM TIME '13:30:25.575401');
SELECT EXTRACT(SECOND FROM TIME '13:30:25.575401');
SELECT EXTRACT(MINUTE FROM TIME '13:30:25.575401');
SELECT EXTRACT(HOUR FROM TIME '13:30:25.575401');
SELECT EXTRACT(DAY FROM TIME '13:30:25.575401'); -- error
SELECT EXTRACT(FORTNIGHT FROM TIME '13:30:25.575401'); -- error
SELECT EXTRACT(TIMEZONE FROM TIME '13:30:25.575401'); -- error
SELECT EXTRACT(EPOCH FROM TIME '13:30:25.575401');

-- date_part implementation is mostly the same as extract, so only
-- test a few cases for additional coverage.
Expand Down

0 comments on commit 758cda7

Please sign in to comment.