You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Ji Liu (JIRA)" <ji...@apache.org> on 2019/08/13 03:16:00 UTC

[jira] [Created] (ARROW-6218) [Java] Add UINT type test in integration to avoid potential overflow

Ji Liu created ARROW-6218:
-----------------------------

             Summary: [Java] Add UINT type test in integration to avoid potential overflow
                 Key: ARROW-6218
                 URL: https://issues.apache.org/jira/browse/ARROW-6218
             Project: Apache Arrow
          Issue Type: Test
          Components: Java
            Reporter: Ji Liu
            Assignee: Ji Liu


As per discussion [https://github.com/apache/arrow/pull/5002]

For UINT type, when write/read json data in integration test, it extend data type(i.e. Long->BigInteger, Int->Long) to avoid potential overflow.

Like UINT8 the write side and read side code like this:

 
{code:java}
case UINT8:

  generator.writeNumber(UInt8Vector.getNoOverflow(buffer, index));

  break;{code}
 
{code:java}
BigInteger value = parser.getBigIntegerValue();

buf.writeLong(value.longValue());
{code}
Should add a test to avoid potential overflow in the data transfer process.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)