goccy / go-zetasqlite

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

[Date] Values that overflow date boundaries are allowed #138

Open ohaibbq opened 10 months ago

ohaibbq commented 10 months ago

In this example, the months part is parsed as 99 months where BigQuery raises an error.

SELECT PARSE_DATE("%D", "99/01/24");
BigQuery Emulator
Failed to parse input string "99/01/24" "2032-03-01"
ohaibbq commented 7 months ago

This has been mostly fixed in #135, but there is still no validation on calendar dates.

For example, February 29th, 2023 is able to be parsed even though it was not a leap year.