You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by GitBox <gi...@apache.org> on 2022/09/09 10:43:00 UTC
[GitHub] [orc] guiyanakuang commented on pull request #1244: ORC-1266: DecimalConvertTreeReader should be reset vector before nextVector
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: issues-unsubscribe@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org