-
Notifications
You must be signed in to change notification settings - Fork 3.9k
ARROW-6218: [Java] Add UINT type test in integration to avoid potential overflow #5072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| final UInt4Vector uInt4Vector = new UInt4Vector("uint4", allocator); | ||
| final UInt1Vector uInt1Vector = new UInt1Vector("uint1", allocator)) { | ||
|
|
||
| long[] longValues = new long[]{0x8000000000000000L, 0x7fffffffffffffffL, 0xffffffffffffffffL}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long.MIN_VALUE, Long.MAX_VALUE, -1L?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, fixed :)
Codecov Report
@@ Coverage Diff @@
## master #5072 +/- ##
==========================================
+ Coverage 87.61% 89.71% +2.1%
==========================================
Files 1009 670 -339
Lines 144082 99567 -44515
Branches 1418 0 -1418
==========================================
- Hits 126231 89327 -36904
+ Misses 17489 10240 -7249
+ Partials 362 0 -362
Continue to review full report at Codecov.
|
praveenbingo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 LGTM. thanks @tianchen92
…al overflow Related to [ARROW-6218](https://issues.apache.org/jira/browse/ARROW-6218). As per discussion apache#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: >case UINT8: generator.writeNumber(UInt8Vector.getNoOverflow(buffer, index)); break; >BigInteger value = parser.getBigIntegerValue(); buf.writeLong(value.longValue()); Should add a test to avoid potential overflow in the data transfer process. Closes apache#5072 from tianchen92/ARROW-6218 and squashes the following commits: 2bdbe7e <tianchen> use MIN_VALUE and MAX_VALUE 1430979 <tianchen> ARROW-6218: Add UINT type test in integration to avoid potential overflow Authored-by: tianchen <niki.lj@alibaba-inc.com> Signed-off-by: Praveen <praveen@dremio.com>
Related to ARROW-6218.
As per discussion #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:
Should add a test to avoid potential overflow in the data transfer process.