[
https://issues.apache.org/jira/browse/PHOENIX-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14351320#comment-14351320
]
Samarth Jain commented on PHOENIX-1577:
---------------------------------------
Thanks for the review [~jamestaylor].
Will remove the whitespace changes on commit.
Yes the test fails without my patch. The test I added is a distilled version of
the test provided.
{code}
java.lang.IllegalArgumentException: nanos > 999999999 or < 0
at java.sql.Timestamp.setNanos(Timestamp.java:386)
at org.apache.phoenix.util.DateUtil.getTimestamp(DateUtil.java:197)
at
org.apache.phoenix.jdbc.PhoenixPreparedStatement.setTimestamp(PhoenixPreparedStatement.java:497)
at
org.apache.phoenix.end2end.TimezoneOffsetFunctionIT.testInsertingRetrivingTimestamp(TimezoneOffsetFunctionIT.java:175)
{code}
> java.lang.IllegalArgumentException: nanos > 999999999 or < 0 while use
> Calendar
> -------------------------------------------------------------------------------
>
> Key: PHOENIX-1577
> URL: https://issues.apache.org/jira/browse/PHOENIX-1577
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.2
> Reporter: Kylin Soong
> Assignee: Samarth Jain
> Attachments: PHOENIX-1577.patch
>
>
> I use the link [1] code, there always nanos > 999999999 or < 0 error throw.
> If execute insert, the error looks like:
> ~~~
> Exception in thread "main" java.lang.IllegalArgumentException: nanos >
> 999999999 or < 0
> at java.sql.Timestamp.setNanos(Timestamp.java:386)
> at org.apache.phoenix.util.DateUtil.getTimestamp(DateUtil.java:142)
> at
> org.apache.phoenix.jdbc.PhoenixPreparedStatement.setTimestamp(PhoenixPreparedStatement.java:489)
> ~~~
> and select the error looks
> ~~~
> xception in thread "main" java.lang.IllegalArgumentException: nanos >
> 999999999 or < 0
> at java.sql.Timestamp.setNanos(Timestamp.java:386)
> at org.apache.phoenix.util.DateUtil.getTimestamp(DateUtil.java:142)
> at
> org.apache.phoenix.jdbc.PhoenixResultSet.getTimestamp(PhoenixResultSet.java:638)
> ~~~
> Does this can be a bug?
> [1]
> https://github.com/kylinsoong/data/blob/master/phoenix-quickstart/src/test/java/org/apache/phoenix/examples/BugReproduce.java
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)