[
https://issues.apache.org/jira/browse/PHOENIX-678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gabriel Reid resolved PHOENIX-678.
----------------------------------
Resolution: Fixed
Bulk resolve of closed issues imported from GitHub. This status was reached by
first re-opening all closed imported issues and then resolving them in bulk.
> java.lang.IllegalArgumentException: nanos > 999999999 or < 0 with
> phoenix-2.1.0
> --------------------------------------------------------------------------------
>
> Key: PHOENIX-678
> URL: https://issues.apache.org/jira/browse/PHOENIX-678
> Project: Phoenix
> Issue Type: Task
> Affects Versions: 3.0-Release
> Reporter: Patrick Reilly
>
> Seeing the following behavior: java.lang.IllegalArgumentException: nanos >
> 999999999 or < 0 with phoenix-2.1.0 and TIMESTAMP data type.
> ```C
> UPSERT INTO MESSAGES
> values(1,2,CURRENT_TIME(),0,0,0,'io','json','hello world 1');
> 0: jdbc:phoenix:msghdpname01> SELECT * FROM MESSAGES;
> +-----------+--------------+---------------------+---------+------------+------------+------------+------------+------------+
>
> | SENDER_ID | RECIPIENT_ID | M_TIMESTAMP | IS_READ |
> IS_DELETED | VISIBILITY | SENDER_IP | JSON | M_TEXT |
> +-----------+--------------+---------------------+---------+------------+------------+------------+------------+------------+
>
> java.lang.IllegalArgumentException: nanos > 999999999 or < 0
> at java.sql.Timestamp.setNanos(Timestamp.java:401)
> at
> com.salesforce.phoenix.schema.PDataType$10.toObject(PDataType.java:1589)
> at
> com.salesforce.phoenix.schema.PDataType.toObject(PDataType.java:4585)
> at
> com.salesforce.phoenix.schema.PDataType.toObject(PDataType.java:4564)
> at
> com.salesforce.phoenix.schema.PDataType.toObject(PDataType.java:4573)
> at
> com.salesforce.phoenix.compile.ExpressionProjector.getValue(ExpressionProjector.java:85)
>
> at
> com.salesforce.phoenix.jdbc.PhoenixResultSet.getObject(PhoenixResultSet.java:476)
>
> at sqlline.SqlLine$Rows$Row.<init>(SqlLine.java:2314)
> at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2430)
> at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2074)
> at sqlline.SqlLine.print(SqlLine.java:1735)
> at sqlline.SqlLine$Commands.execute(SqlLine.java:3683)
> at sqlline.SqlLine$Commands.sql(SqlLine.java:3584)
> at sqlline.SqlLine.dispatch(SqlLine.java:821)
> at sqlline.SqlLine.begin(SqlLine.java:699)
> at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
> at sqlline.SqlLine.main(SqlLine.java:424)
> 0: jdbc:phoenix:msghdpname01> !describe MESSAGES
> +------------+-------------+------------+-------------+-----------+------------+-------------+---------------+----------------+----------------+----------+------------+---------------+
>
> | TABLE_CAT | TABLE_SCHEM | TABLE_NAME | COLUMN_NAME | DATA_TYPE |
> TYPE_NAME | COLUMN_SIZE | BUFFER_LENGTH | DECIMAL_DIGITS |
> NUM_PREC_RADIX | NULLABLE | COLUMN_DEF | SQL_DATA_TYPE |
> +------------+-------------+------------+-------------+-----------+------------+-------------+---------------+----------------+----------------+----------+------------+---------------+
>
> | null | null | MESSAGES | SENDER_ID | 10 |
> UNSIGNED_LONG | null | null | null | null
> | 0 | null | null
> | null | null | MESSAGES | RECIPIENT_ID | 10 |
> UNSIGNED_LONG | null | null | null | null
> | 0 | null | null
> | null | null | MESSAGES | M_TIMESTAMP | 93 |
> TIMESTAMP | null | null | null | null
> | 0 | null | null |
> | _0 | null | MESSAGES | IS_READ | -6 |
> TINYINT | null | null | null | null
> | 1 | null | null |
> | _0 | null | MESSAGES | IS_DELETED | -6 |
> TINYINT | null | null | null | null
> | 1 | null | null |
> | _0 | null | MESSAGES | VISIBILITY | -6 |
> TINYINT | null | null | null | null
> | 1 | null | null |
> | B | null | MESSAGES | SENDER_IP | 12 |
> VARCHAR | null | null | null | null
> | 1 | null | null |
> | B | null | MESSAGES | JSON | 12 |
> VARCHAR | null | null | null | null
> | 1 | null | null |
> | B | null | MESSAGES | M_TEXT | 12 |
> VARCHAR | null | null | null | null
> | 1 | null | null |
> +------------+-------------+------------+-------------+-----------+------------+-------------+---------------+----------------+----------------+----------+------------+---------------+
>
> ```
> Any ideas what's happening here?
> Originally reported here:
> https://groups.google.com/forum/_!topic/phoenix-hbase-user/Upy6iz6cUFs
--
This message was sent by Atlassian JIRA
(v6.2#6252)