goccy / go-zetasqlite

A database driver library that interprets ZetaSQL queries and runs them using SQLite3
MIT License
56 stars 29 forks source link

zetasqlite.TimeFromTimestampValue doesn't work well with Time Zones data in the incoming string #220

Open iolalla opened 3 months ago

iolalla commented 3 months ago

This is a TIMESTAMP exported from bigquery like this fails in the method and gives an error "2023-12-15 09:08:04 +0000 UTC" ERROR--> failed to convert value from {Name: Ordinal:2 Value:2012-07-20 10:05:00 +0000 UTC}: failed to convert 2012-07-20 10:05:00 +0000 UTC to time.Time type

This code is used by the bigquery emulator in the repository.go.

Here you have a file to test the case.

otro_limit100.zip