feldera / feldera

The Feldera Incremental Computation Engine
https://feldera.com
Other
688 stars 44 forks source link

[SQL] Support PARSE_DATE, PARSE_DATETIME, PARSE_TIME #2716

Open ryzhyk opened 2 weeks ago

mihaibudiu commented 2 weeks ago

These things can be much trickier than they look because Calcite already has rules for format strings, and they may not match the format strings that Rust libraries use. We already have a similar issue for the reverse direction: #2275

mihaibudiu commented 2 weeks ago

You will also note that the Calcite documentation does not specify anywhere the format string rules, they have to be reverse engineered from the implementation. These functions are actually in the BigQuery dialect, so the right documentation to use the BigQuery documentation.

ryzhyk commented 2 weeks ago

Can we just use the strftime format?

mihaibudiu commented 2 weeks ago

Only if strftime works in the same way across Java, Rust, and Bigquery.

mihaibudiu commented 2 weeks ago

But that's exactly why we have #2275, the interpretation of the format string is different in different languages.

mihaibudiu commented 2 weeks ago

Another alternative is for us not to load the bigquery function library at all, and then we can use these names.

mihaibudiu commented 2 weeks ago

Then we get to define how these functions work.