Skip to content

Commit 619123a

Browse files
authored
Revert "chore: revert tests (apache#18065)" (apache#18255)
## Which issue does this PR close? - Relates apache#18062 - Relates apache#18065 ## Rationale for this change We disabled these tests because CI was failing on main. The test: `current_date() = cast(now() as date)` was added in apache#18034 requires `now` to use configured timezone, but it is only available after apache#18017. Since apache#18017 has been merged, these tests should be enable. ## What changes are included in this PR? This reverts commit a65a2cb. ## Are these changes tested? Yes. ## Are there any user-facing changes? No.
1 parent 665a552 commit 619123a

1 file changed

Lines changed: 41 additions & 43 deletions

File tree

datafusion/sqllogictest/test_files/current_date_timezone.slt

Lines changed: 41 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -19,64 +19,62 @@
1919
## current_date with timezone tests
2020
##########
2121

22-
# CI Fails https://github.com/apache/datafusion/issues/18062
23-
2422
# Test 1: Verify current_date is consistent within the same query (default UTC)
25-
# query B
26-
# SELECT current_date() = current_date();
27-
# ----
28-
# true
23+
query B
24+
SELECT current_date() = current_date();
25+
----
26+
true
2927

3028
# Test 2: Verify alias 'today' works the same as current_date
31-
# query B
32-
# SELECT current_date() = today();
33-
# ----
34-
# true
29+
query B
30+
SELECT current_date() = today();
31+
----
32+
true
3533

3634
# Test 3: Set timezone to +05:00 and verify current_date is still stable
37-
# statement ok
38-
# SET datafusion.execution.time_zone = '+05:00';
35+
statement ok
36+
SET datafusion.execution.time_zone = '+05:00';
3937

40-
# query B
41-
# SELECT current_date() = current_date();
42-
# ----
43-
# true
38+
query B
39+
SELECT current_date() = current_date();
40+
----
41+
true
4442

45-
# Test 4: Verify current_date matches cast(now() as date) in the same timezone
46-
# query B
47-
# SELECT current_date() = cast(now() as date);
48-
# ----
49-
# true
43+
#Test 4: Verify current_date matches cast(now() as date) in the same timezone
44+
query B
45+
SELECT current_date() = cast(now() as date);
46+
----
47+
true
5048

5149
# Test 5: Test with negative offset timezone
52-
# statement ok
53-
# SET datafusion.execution.time_zone = '-08:00';
50+
statement ok
51+
SET datafusion.execution.time_zone = '-08:00';
5452

55-
# query B
56-
# SELECT current_date() = today();
57-
# ----
58-
# true
53+
query B
54+
SELECT current_date() = today();
55+
----
56+
true
5957

6058
# Test 6: Test with named timezone (America/New_York)
61-
# statement ok
62-
# SET datafusion.execution.time_zone = 'America/New_York';
59+
statement ok
60+
SET datafusion.execution.time_zone = 'America/New_York';
6361

64-
# query B
65-
# SELECT current_date() = current_date();
66-
# ----
67-
# true
62+
query B
63+
SELECT current_date() = current_date();
64+
----
65+
true
6866

6967
# Test 7: Verify date type is preserved
70-
# query T
71-
# SELECT arrow_typeof(current_date());
72-
# ----
73-
# Date32
68+
query T
69+
SELECT arrow_typeof(current_date());
70+
----
71+
Date32
7472

7573
# Test 8: Reset to UTC
76-
# statement ok
77-
# SET datafusion.execution.time_zone = '+00:00';
74+
statement ok
75+
SET datafusion.execution.time_zone = '+00:00';
7876

79-
# query B
80-
# SELECT current_date() = today();
81-
# ----
82-
# true
77+
query B
78+
SELECT current_date() = today();
79+
----
80+
true

0 commit comments

Comments
 (0)