liyafan82 commented on a change in pull request #7290: URL: https://github.com/apache/arrow/pull/7290#discussion_r439338218
########## File path: java/vector/src/main/codegen/templates/UnionVector.java ########## @@ -586,7 +686,9 @@ public ValueVector getVectorByType(int typeId) { } public ValueVector getVectorByType(int typeId, ArrowType arrowType) { - switch (MinorType.values()[typeId]) { + Types.MinorType type = (typeIds[typeId] != null) ? + Types.getMinorTypeForArrowType(typeIds[typeId].getType()) : Types.MinorType.values()[typeId]; + switch (type) { Review comment: Here we are still relying on the MinorType ordinal as the type ID? If so, the sparse union vector is still not aligning with the specification, and that causes the integration test to fail? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org