[GitHub] [calcite] julianhyde commented on pull request #2973: [CALCITE-5180] Implement some of the overloads for BigQuery's DATE and TIMESTAMP
julianhyde commented on PR #2973: URL: https://github.com/apache/calcite/pull/2973#issuecomment-1355981493 @mkou, In `SqlLibraryOperators`, the `TIMESTAMP` function should return a Calcite `TIMESTAMP`, `DATE` will return `DATE`, and there is no `DATETIME` function. Elsewhere (or in non-open source code), there can be a function called `DATETIME` that returns a Calcite `TIMESTAMP` (what BQ calls a `DATETIME`), and a function called `TIMESTAMP` that returns a Calcite `TIMESTAMP WITH LOCAL TIME ZONE` (what BQ calls a `TIMESTAMP`). The `DATETIME` function would in fact be `SqlLibraryOperators.TIMESTAMP.withName("DATETIME")`. And so forth. Sorry it's complicated. But we need to keep the function library orthogonal to any type aliasing. -- 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: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] julianhyde commented on pull request #2973: [CALCITE-5180] Implement some of the overloads for BigQuery's DATE and TIMESTAMP
julianhyde commented on PR #2973: URL: https://github.com/apache/calcite/pull/2973#issuecomment-1322750893 The precision issue really is orthogonal, so at best it muddies the waters. See https://issues.apache.org/jira/browse/CALCITE-5266. -- 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: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] julianhyde commented on pull request #2973: [CALCITE-5180] Implement some of the overloads for BigQuery's DATE and TIMESTAMP
julianhyde commented on PR #2973: URL: https://github.com/apache/calcite/pull/2973#issuecomment-1322748744 Let's move design discussions to the Jira case. -- 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: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] julianhyde commented on pull request #2973: [CALCITE-5180] Implement some of the overloads for BigQuery's DATE and TIMESTAMP
julianhyde commented on PR #2973: URL: https://github.com/apache/calcite/pull/2973#issuecomment-1322709533 No, BigQuery, a timestamp is represented internally as an offset in microseconds since epoch *UTC*. The "UTC" is a crucial difference. Sure, they're both a bunch of bits. But so is a 64 bit IEEE floating point number. The interpretation of those bits is crucial. -- 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: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] julianhyde commented on pull request #2973: [CALCITE-5180] Implement some of the overloads for BigQuery's DATE and TIMESTAMP
julianhyde commented on PR #2973: URL: https://github.com/apache/calcite/pull/2973#issuecomment-1320951570 BQ `DATETIME` = Calcite `TIMESTAMP` -- 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: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org