Skip to content

Commit 69d8bd0

Browse files
committed
Fix jar build
1 parent 549f52e commit 69d8bd0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vector/src/main/codegen/templates/UnionVector.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,10 @@ public StructVector getStruct() {
280280
<#if minor.class?starts_with("Decimal") || is_timestamp_tz(minor.class) || minor.class == "Duration" || minor.class == "FixedSizeBinary">
281281
public ${name}Vector get${name}Vector() {
282282
if (${uncappedName}Vector == null) {
283-
throw new IllegalArgumentException("No ${name} present. Provide ArrowType argument to create a new vector");
283+
${uncappedName}Vector = internalStruct.getChild(fieldName(MinorType.${name?upper_case}), ${name}Vector.class);
284+
if (${uncappedName}Vector == null) {
285+
throw new IllegalArgumentException("No ${name} present. Provide ArrowType argument to create a new vector");
286+
}
284287
}
285288
return ${uncappedName}Vector;
286289
}
@@ -307,9 +310,6 @@ public StructVector getStruct() {
307310
308311
public ${name}Vector get${name}Vector(String name) {
309312
if (${uncappedName}Vector == null) {
310-
${uncappedName}Vector = internalStruct.getChild(fieldName(MinorType.${name?upper_case}), ${name}Vector.class);
311-
if (${uncappedName}Vector == null) {
312-
throw new IllegalArgumentException("No ${uncappedName} present. Provide ArrowType argument to create a new vector");
313313
int vectorCount = internalStruct.size();
314314
${uncappedName}Vector = addOrGet(name, MinorType.${name?upper_case}, ${name}Vector.class);
315315
if (internalStruct.size() > vectorCount) {

0 commit comments

Comments
 (0)