SEPURI-SAI-KRISHNA commented on PR #29366: URL: https://github.com/apache/flink/pull/29366#issuecomment-7057672381
Other vendors, two `TIME` values with `YEAR`, `QUARTER` or `MONTH`: - MySQL 8.0 `TIMESTAMPDIFF`: 0 - SQL Server `DATEDIFF`: 0 ([docs](https://learn.microsoft.com/en-us/sql/t-sql/functions/datediff-transact-sql)) - PostgreSQL: no `TIMESTAMPDIFF`, `TIME - TIME` is an interval under a day - BigQuery `TIME_DIFF`: only `HOUR` and smaller Flink master returns 118277 for `MONTH`. `TIME` mixed with `TIMESTAMP`: MySQL uses `CURRENT_DATE`, SQL Server 1900-01-01. Flink already uses 1970-01-01: `CAST(TIME '12:00:00' AS TIMESTAMP)` gives `1970-01-01 12:00:00`, and the existing 613 and -612 tests rely on it. Tests: each expected value is what the same call returns with the `TIME` cast to `TIMESTAMP`. I removed the `23:59:59` to `00:00:01` case. Its -1 comes from how months are counted backwards, which is wrong for `TIMESTAMP` too, so I filed FLINK-41596 for it. If you prefer to reject `YEAR`, `QUARTER` and `MONTH` for two `TIME` values, as BigQuery does, I can change it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
