Skip to content

Commit ad23507

Browse files
committed
Re-gen timestamp.sql.out
1 parent d4751af commit ad23507

File tree

2 files changed

+186
-56
lines changed

2 files changed

+186
-56
lines changed

sql/core/src/test/resources/sql-tests/inputs/pgSQL/timestamp.sql

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
CREATE TABLE TIMESTAMP_TBL (d1 timestamp) USING parquet;
99

10-
-- [SPARK-28141] Timestamp type can not accept special values
1110
-- Test shorthand input values
1211
-- We can't just "select" the results since they aren't constants; test for
1312
-- equality instead. We can do that by running the test inside a transaction
@@ -17,22 +16,22 @@ CREATE TABLE TIMESTAMP_TBL (d1 timestamp) USING parquet;
1716
-- block is entered exactly at local midnight; then 'now' and 'today' have
1817
-- the same values and the counts will come out different.
1918

20-
-- INSERT INTO TIMESTAMP_TBL VALUES ('now');
19+
INSERT INTO TIMESTAMP_TBL VALUES ('now');
2120
-- SELECT pg_sleep(0.1);
2221

2322
-- BEGIN;
2423

25-
-- INSERT INTO TIMESTAMP_TBL VALUES ('now');
26-
-- INSERT INTO TIMESTAMP_TBL VALUES ('today');
27-
-- INSERT INTO TIMESTAMP_TBL VALUES ('yesterday');
28-
-- INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow');
24+
INSERT INTO TIMESTAMP_TBL VALUES ('now');
25+
INSERT INTO TIMESTAMP_TBL VALUES ('today');
26+
INSERT INTO TIMESTAMP_TBL VALUES ('yesterday');
27+
INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow');
2928
-- time zone should be ignored by this data type
30-
-- INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow EST');
31-
-- INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow zulu');
29+
INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow EST');
30+
INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow zulu');
3231

33-
-- SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp 'today';
34-
-- SELECT count(*) AS Three FROM TIMESTAMP_TBL WHERE d1 = timestamp 'tomorrow';
35-
-- SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp 'yesterday';
32+
SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp 'today';
33+
SELECT count(*) AS Three FROM TIMESTAMP_TBL WHERE d1 = timestamp 'tomorrow';
34+
SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp 'yesterday';
3635
-- SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp(2) 'now';
3736

3837
-- COMMIT;
@@ -53,7 +52,7 @@ CREATE TABLE TIMESTAMP_TBL (d1 timestamp) USING parquet;
5352
-- Special values
5453
-- INSERT INTO TIMESTAMP_TBL VALUES ('-infinity');
5554
-- INSERT INTO TIMESTAMP_TBL VALUES ('infinity');
56-
-- INSERT INTO TIMESTAMP_TBL VALUES ('epoch');
55+
INSERT INTO TIMESTAMP_TBL VALUES ('epoch');
5756
-- [SPARK-27923] Spark SQL insert there obsolete special values to NULL
5857
-- Obsolete special values
5958
-- INSERT INTO TIMESTAMP_TBL VALUES ('invalid');

0 commit comments

Comments
 (0)