sharanggupta commented on code in PR #1381:
URL: https://github.com/apache/arrow-java/pull/1381#discussion_r4500917030
##########
vector/src/main/codegen/templates/DenseUnionVector.java:
##########
@@ -631,6 +631,7 @@ private void createTransferPairs() {
to.childVectors[i] = dstVec;
internalTransferPairs[i] = srcVec.makeTransferPair(dstVec);
}
+ to.nextTypeId = nextTypeId;
Review Comment:
Thanks for the reproducer. The transfer pair indexed `typeFields` and
`childVectors` by registration order instead of by type id, which stayed hidden
while the target's `nextTypeId` was 0. 7f8447ec maps them through
`typeMapFields` in `createTransferPairs`, `transfer()` and
`splitAndTransfer()`; the last one also sized its per-type arrays by the type
count, so it overflowed for id 10. Your example is now
`testTransferWithDeclaredTypeIds`, with a second transfer and a
`splitAndTransfer` variant.
--
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]