Add additional functionality for the duckdb.unresolved_type #643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In 0.3.0 we added the
duckdb.unresolved_type
type and implemented a bunch of operators, aggregates and functions for it. Of course the list will always be incomplete and casts to actual types might always be necessary in some cases. But for usability we should still try to implement the most commonly used functionality. So this adds a bunch of additional things that I ran into over the past weeks:min
aggregate, this was not present in 0.3.0 by accident. Probably because DuckDB has twomin
aggregates.time
,timetz
,interval
andbit
date_trunc
,length
andregexp_replace
strftime
andstrptime
functions. This is useful even for already resolved/castedtimestamp
/date
values because Postgres its date formatting functions liketo_char
are not available in DuckDB.~
,~~
,~~*
,!~
,!~~
, and !~~*`epoch
/epoch_ms
/epoch_us
/epoch_ns
functions. These are useful for lots of data processing tasks, because often timestamps are stored as a number relative to the epoch in data files/tables.To make the string of parsing/formatting of
strftime
/strptime
consistent this also starts syncing the PG timezone to DuckDB.