[
https://issues.apache.org/jira/browse/PHOENIX-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14299967#comment-14299967
]
James Taylor commented on PHOENIX-1617:
---------------------------------------
One other issue specific to TIMESTAMP is the preservation of the nanos part of
the time. [~gabriel.reid] - is there a way with JODA time to preserve the nanos
and output a Timestamp? We might have to live with millisecond granularity for
TIMESTAMP. Would that be against the ANSI SQL 99 spec?
> 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)