Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-6218

[Java] Add UINT type test in integration to avoid potential overflow

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 0.15.0
    • Java

    Description

      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:

       

      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.

      Attachments

        Issue Links

          Activity

            People

              tianchen92 Ji Liu
              tianchen92 Ji Liu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m