8000 Issue #16839: Disable TIMESTAMP Casts by hawkfish · Pull Request #16899 · duckdb/duckdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Issue #16839: Disable TIMESTAMP Casts #16899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 22, 2025
Merged

Conversation

hawkfish
Copy link
Contributor
  • Add a setting to disable timestamp => timestamptz casts in ICU (for safety)

fixes: #16839

* Add a setting to disable timestamp => timestamptz casts in ICU (for safety)

fixes: duckdb#16839
@duckdb-draftbot duckdb-draftbot marked this pull request as draft March 31, 2025 02:22
@hawkfish hawkfish marked this pull request as ready for review April 2, 2025 08:04
* PR Feedback: Better message test...

fixes: duckdb#16839
@duckdb-draftbot duckdb-draftbot marked this pull request as draft April 2, 2025 21:33
@hawkfish hawkfish marked this pull request as ready for review April 8, 2025 21:38
@duckdb-draftbot duckdb-draftbot marked this pull request as draft April 14, 2025 21:04
@hawkfish hawkfish marked this pull request as ready for review April 16, 2025 23:27
@Mytherin
Copy link
Collaborator

CI failure seems related here:

2025-04-17T02:09:48.1534761Z [790/1118]: test/sql/timezone/disable_timestamptz_casts.test ()
2025-04-17T02:09:48.1535416Z FAILURE IN RUNNING TEST
2025-04-17T02:09:48.1536117Z --------------------
2025-04-17T02:09:48.1536527Z RETURNCODE
2025-04-17T02:09:48.1538281Z --------------------
2025-04-17T02:09:48.1538718Z 1
2025-04-17T02:09:48.1539062Z --------------------
2025-04-17T02:09:48.1539386Z STDOUT
2025-04-17T02:09:48.1539744Z --------------------
2025-04-17T02:09:48.1540136Z Filters: test/sql/timezone/disable_timestamptz_casts.test
2025-04-17T02:09:48.1540393Z 
2025-04-17T02:09:48.1540400Z 
2025-04-17T02:09:48.1540713Z [0/1] (0%): test/sql/timezone/disable_timestamptz_casts.test                    
2025-04-17T02:09:48.1541157Z 
2025-04-17T02:09:48.1541386Z ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-04-17T02:09:48.1541603Z 
2025-04-17T02:09:48.1541794Z unittest.exe is a Catch v2.13.7 host application.
2025-04-17T02:09:48.1542011Z 
2025-04-17T02:09:48.1542132Z Run with -? for options
2025-04-17T02:09:48.1542263Z 
2025-04-17T02:09:48.1542277Z 
2025-04-17T02:09:48.1542355Z 
2025-04-17T02:09:48.1542607Z -------------------------------------------------------------------------------
2025-04-17T02:09:48.1542844Z 
2025-04-17T02:09:48.1543039Z test/sql/timezone/disable_timestamptz_casts.test
2025-04-17T02:09:48.1543291Z 
2025-04-17T02:09:48.1543645Z -------------------------------------------------------------------------------
2025-04-17T02:09:48.1543879Z 
2025-04-17T02:09:48.1544119Z D:/a/duckdb/duckdb/test/sqlite/test_sqllogictest.cpp(213)
2025-04-17T02:09:48.1544358Z 
2025-04-17T02:09:48.1544590Z ...............................................................................
2025-04-17T02:09:48.1544802Z 
2025-04-17T02:09:48.1544808Z 
2025-04-17T02:09:48.1544814Z 
2025-04-17T02:09:48.1545183Z test/sql/timezone/disable_timestamptz_casts.test(30): FAILED:
2025-04-17T02:09:48.1545438Z 
2025-04-17T02:09:48.1545568Z explicitly with message:
2025-04-17T02:09:48.1545703Z 
2025-04-17T02:09:48.1545767Z   0
2025-04-17T02:09:48.1545863Z 
2025-04-17T02:09:48.1545868Z 
2025-04-17T02:09:48.1545877Z 
2025-04-17T02:09:48.1545885Z 
2025-04-17T02:09:48.1546192Z [1/1] (100%): test/sql/timezone/disable_timestamptz_casts.test                  
2025-04-17T02:09:48.1546615Z 
2025-04-17T02:09:48.1546949Z ===============================================================================
2025-04-17T02:09:48.1547281Z 
2025-04-17T02:09:48.1547470Z test cases: 1 | 1 failed
2025-04-17T02:09:48.1547827Z 
2025-04-17T02:09:48.1548066Z assertions: 8 | 7 passed | 1 failed
2025-04-17T02:09:48.1548345Z 
2025-04-17T02:09:48.1548355Z 
2025-04-17T02:09:48.1548368Z 
2025-04-17T02:09:48.1548376Z 
2025-04-17T02:09:48.1548543Z --------------------
2025-04-17T02:09:48.1548834Z STDERR
2025-04-17T02:09:48.1549145Z --------------------
2025-04-17T02:09:48.1549655Z ================================================================================
2025-04-17T02:09:48.1549974Z 
2025-04-17T02:09:48.1550612Z Query unexpectedly succeeded! (test/sql/timezone/disable_timestamptz_casts.test:30)!
2025-04-17T02:09:48.1551187Z 
2025-04-17T02:09:48.1551531Z ================================================================================
2025-04-17T02:09:48.1551873Z 
2025-04-17T02:09:48.1552362Z select cast('2020-01-01T00:00:00'::timestamp as timestamptz);
2025-04-17T02:09:48.1552776Z 
2025-04-17T02:09:48.1553112Z ================================================================================
2025-04-17T02:09:48.1553439Z 
2025-04-17T02:09:48.1553919Z CAST(CAST('2020-01-01T00:00:00' AS TIMESTAMP) AS TIMESTAMP WITH TIME ZONE)	
2025-04-17T02:09:48.1554366Z 
2025-04-17T02:09:48.1554564Z TIMESTAMP WITH TIME ZONE	
2025-04-17T02:09:48.1554789Z 
2025-04-17T02:09:48.1554889Z [ Rows: 1]
2025-04-17T02:09:48.1555038Z 
2025-04-17T02:09:48.1555218Z 2020-01-01 00:00:00+00
2025-04-17T02:09:48.1555398Z 
2025-04-17T02:09:48.1555407Z 
2025-04-17T02:09:48.1555416Z 
2025-04-17T02:09:48.1555423Z 
2025-04-17T02:09:48.1555439Z 

@hawkfish
Copy link
Contributor Author

Sorry missed that. Think I just forgot to set the environment.

@duckdb-draftbot duckdb-draftbot marked this pull request as draft April 17, 2025 09:59
@Mytherin Mytherin marked this pull request as ready for review April 21, 2025 19:28
@Mytherin Mytherin merged commit 88c4366 into duckdb:main Apr 22, 2025
49 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

@hawkfish hawkfish deleted the timestamptz-casts branch April 22, 2025 21:25
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 18, 2025
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 18, 2025
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Casting between timestamp and timestamptz should be disallowed in favor of "at time zone"
2 participants
0