[
https://issues.apache.org/jira/browse/PHOENIX-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14299982#comment-14299982
]
Gabriel Reid commented on PHOENIX-1617:
---------------------------------------
No, Joda-time doesn't have support for nanosecond granularity, it only goes to
millisecond. I'm ok with that because I don't have any use cases that go any
lower than millisecond, but of course there may be other people who do have
that use case.
As for TIMESTAMP in SQL-99, nothing I've been able to find on a quick Google
search (among other things, this [copy of the SQL-99
BNF|http://savage.net.au/SQL/sql-99.bnf.html]) specifically mentions nanosecond
granularity -- instead, it just seems to mention the concept of fractional
seconds without specifying a precision.
> Date literals and CURRENT_DATE() calls do not work in VIEW definition
> ---------------------------------------------------------------------
>
> Key: PHOENIX-1617
> URL: https://issues.apache.org/jira/browse/PHOENIX-1617
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
>
> The following will not work correct:
> {code}
> CREATE TABLE t (k INTEGER, v1 DATE);
> CREATE VIEW v AS
> SELECT * FROM t WHERE v1 < CURRENT_DATE()-1;
> {code}
> There are two issues: date literals do not round trip correctly from
> ParseNode -> Expression -> String. We need to output them as TO_DATE(<date as
> string>). Until we have a way to represent TIME and TIMESTAMP(PHOENIX-688 or
> PHOENIX-653), we're stuck.
> The CURRENT_DATE built-in has a similar issue. We end up turning it into a
> date literal, but instead we should have a CurrentDateExpression that
> evaluates to a literal, but which let's us roundtrip the ParseNode from an
> Expression to a String correctly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)