feldera / feldera

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

[SQL] Support PARSE_DATE, PARSE_DATETIME, PARSE_TIME #2716

Open ryzhyk opened 1 month ago

mihaibudiu commented 1 month 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 1 month 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 1 month ago

Can we just use the strftime format?

mihaibudiu commented 1 month ago

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

mihaibudiu commented 1 month ago

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

mihaibudiu commented 1 month ago

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

mihaibudiu commented 1 month ago

Then we get to define how these functions work.