-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Cast INTERVAL and UUID to VARCHAR #12080
Conversation
Thanks for the PR! I wonder what the Postgres ODBC clients' behavior is, as they have the same interval type that we do. Do they just cast to VARCHAR as well or do something different? We should likely do what they do here. |
Looks like they have an ifdef and likely turn it into varchar in regular releases as some applications don't handle the interval type correctly. |
thanks @Mytherin for taking a look!
I can't find anywhere in the code that they convert |
Hi Guen, thanks for your PR, could you reopen it on the new ODBC repo? |
@maiadegraaf yes of course! PR is open here |
Fixes MotherDuck-Open-Source/duckdb-power-query-connector#7.
Power Query/Power BI currently does not support
INTERVAL
and loading data with this type results in an error:Similarly, implementing a cast to
TIME
also won't work because in Power Query, valid values forTIME
hours are 0-23.UUID
has a similar problem that it throws an "Unimplemented type for cast (UUID -> DOUBLE)` error.This PR casts
INTERVAL
andUUID
toVARCHAR
by default. TheINTERVAL
value can be parsed separately in Power Query, for instance by usingDuration.FromText
(see docs).