guiyanakuang commented on PR #1244:
URL: https://github.com/apache/orc/pull/1244#issuecomment-1241809732

   Thank you for making a PR, @cxzl25 
   
   I've done some investigation into this issue. `decimalColVector.reset()` 
seems to fix only part of the bug. I think the fundamental issue is that ORC is 
missing code to check and set isRepeating when reading all decimal vectors that 
are not null. 
   
   Make a few simple changes in your test code, the first 1024 values we set to 
1.
   ```java
         VectorizedRowBatch b = schema.createRowBatch();
         DecimalColumnVector f1 = (DecimalColumnVector) b.cols[0];
         f1.isRepeating = true;
         f1.set(0, HiveDecimal.create(1));
         b.size = 1024;
         w.addRowBatch(b);
   
        // skip some code
        assertTrue(batch.cols[0].isRepeating);  // We actually get false. 
   ```
   There is no code to check and set isRepeating to a filled vector.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to