Skip to content

Commit

Permalink
Fix jar build
Browse files Browse the repository at this point in the history
  • Loading branch information
lriggs committed Mar 14, 2024
1 parent 8da676e commit fc7191b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions java/vector/src/main/codegen/templates/UnionVector.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ public StructVector getStruct() {
<#if minor.class?starts_with("Decimal") || is_timestamp_tz(minor.class) || minor.class == "Duration" || minor.class == "FixedSizeBinary">
public ${name}Vector get${name}Vector() {
if (${uncappedName}Vector == null) {
throw new IllegalArgumentException("No ${name} present. Provide ArrowType argument to create a new vector");
${uncappedName}Vector = internalStruct.getChild(fieldName(MinorType.${name?upper_case}), ${name}Vector.class);
if (${uncappedName}Vector == null) {
throw new IllegalArgumentException("No ${name} present. Provide ArrowType argument to create a new vector");
}
}
return ${uncappedName}Vector;
}
Expand All @@ -306,10 +309,6 @@ public StructVector getStruct() {

public ${name}Vector get${name}Vector(String name) {
if (${uncappedName}Vector == null) {
${uncappedName}Vector = internalStruct.getChild(fieldName(MinorType.${name?upper_case}), ${name}Vector.class);
if (${uncappedName}Vector == null) {
throw new IllegalArgumentException("No ${uncappedName} present. Provide ArrowType argument to create a new vector");
}
int vectorCount = internalStruct.size();
${uncappedName}Vector = addOrGet(name, MinorType.${name?upper_case}, ${name}Vector.class);
if (internalStruct.size() > vectorCount) {
Expand Down Expand Up @@ -913,4 +912,4 @@ public void setInitialCapacity(int valueCount, double density) {
public void setNull(int index) {
throw new UnsupportedOperationException("The method setNull() is not supported on UnionVector.");
}
}
}

0 comments on commit fc7191b

Please sign in to comment.