Skip to content

Commit 629d9af

Browse files
committed
GH-725: updated tests
1 parent 928519b commit 629d9af

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

vector/src/test/java/org/apache/arrow/vector/complex/impl/UuidReaderImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@ public MinorType getMinorType() {
3636
return vector.getMinorType();
3737
}
3838

39+
@Override
3940
public Field getField() {
4041
return vector.getField();
4142
}
4243

44+
@Override
4345
public boolean isSet() {
4446
return !vector.isNull(idx());
4547
}
4648

49+
@Override
4750
public void read(ExtensionHolder holder) {
4851
UuidHolder uuidHolder = (UuidHolder) holder;
4952
vector.get(idx(), uuidHolder);

vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
2020
import static org.junit.jupiter.api.Assertions.assertEquals;
2121
import static org.junit.jupiter.api.Assertions.assertFalse;
22+
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
2223
import static org.junit.jupiter.api.Assertions.assertNotNull;
2324
import static org.junit.jupiter.api.Assertions.assertNull;
2425
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -88,6 +89,7 @@
8889
import org.apache.arrow.vector.holders.NullableTimeStampNanoTZHolder;
8990
import org.apache.arrow.vector.holders.TimeStampMilliTZHolder;
9091
import org.apache.arrow.vector.types.TimeUnit;
92+
import org.apache.arrow.vector.types.Types.MinorType;
9193
import org.apache.arrow.vector.types.pojo.ArrowType;
9294
import org.apache.arrow.vector.types.pojo.ArrowType.ArrowTypeID;
9395
import org.apache.arrow.vector.types.pojo.ArrowType.Int;
@@ -2522,6 +2524,9 @@ public void extensionWriterReader() throws Exception {
25222524
final ByteBuffer bb = ByteBuffer.wrap(uuidHolder.value);
25232525
UUID actualUuid = new UUID(bb.getLong(), bb.getLong());
25242526
assertEquals(u1, actualUuid);
2527+
assertTrue(uuidReader.isSet());
2528+
assertEquals(uuidReader.getMinorType(), MinorType.EXTENSIONTYPE);
2529+
assertInstanceOf(UuidType.class, uuidReader.getField().getFieldType().getType());
25252530
}
25262531
}
25272532
}

0 commit comments

Comments
 (0)