Skip to content

Feat(SQL Parser): Add String to Interval cast#90

Merged
arnaudfnr merged 3 commits into
mainfrom
arnaudfnr/feat-add-interval-cast
Jun 26, 2026
Merged

Feat(SQL Parser): Add String to Interval cast#90
arnaudfnr merged 3 commits into
mainfrom
arnaudfnr/feat-add-interval-cast

Conversation

@arnaudfnr

Copy link
Copy Markdown
Collaborator

Context

In All4Trees Data, the 'beer' column type has been changed from seconds to a time with format "%H:%m:%S" (to make it easier for people to fille the form). Therefore we need to convert this time into seconds in order to perform the formula computation as before.
In order to do that, a new type cast has been added in the evaluator : Interval cast.

cast(args[0], Interval was not working due to the following error :

_duckdb.ConversionException: Conversion Error: invalid timestamp field format: "00:05:05", expected format is (YYYY-MM-DD HH:MM:SS[.US][±HH[:MM[:SS]]| ZONE]) when casting from source column beer1

Therefore I used the SQL cast directly which works.

@arnaudfnr arnaudfnr merged commit 5982567 into main Jun 26, 2026
3 checks passed
@arnaudfnr arnaudfnr deleted the arnaudfnr/feat-add-interval-cast branch June 26, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant