Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions java/vector/src/main/codegen/templates/UnionVector.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ public static UnionVector empty(String name, BufferAllocator allocator) {
return new UnionVector(name, allocator, fieldType, null);
}

@Deprecated
public UnionVector(String name, BufferAllocator allocator, CallBack callBack) {
this(name, allocator, null, callBack);
}

public UnionVector(String name, BufferAllocator allocator, FieldType fieldType, CallBack callBack) {
super(name, allocator, callBack);
this.fieldType = fieldType;
Expand Down Expand Up @@ -522,7 +517,7 @@ private class TransferImpl implements TransferPair {
private final UnionVector to;

public TransferImpl(String name, BufferAllocator allocator, CallBack callBack) {
to = new UnionVector(name, allocator, callBack);
to = new UnionVector(name, allocator, /* field type */ null, callBack);
internalStructVectorTransferPair = internalStruct.makeTransferPair(to.internalStruct);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1215,17 +1215,6 @@ protected final void setBytes(int index, byte[] value, int start, int length) {
valueBuffer.setBytes(startOffset, value, start, length);
}

/**
* Gets the starting offset of a record, given its index.
* This method is deprecated. Please use {@link BaseVariableWidthVector#getStartOffset(int)} instead.
* @param index index of the record.
* @return the starting offset of the record.
*/
@Deprecated
protected final int getstartOffset(int index) {
return getStartOffset(index);
}

public final int getStartOffset(int index) {
return offsetBuffer.getInt((long) index * OFFSET_WIDTH);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,6 @@ public static void setBit(ArrowBuf validityBuffer, long index) {
validityBuffer.setByte(byteIndex, currentByte);
}

/**
* Set the bit at provided index to 1.
*
* @deprecated Please use {@link BitVectorHelper#setBit(ArrowBuf, long)} instead..
*/
@Deprecated
public static void setValidityBitToOne(ArrowBuf validityBuffer, int index) {
setBit(validityBuffer, index);
}

/**
* Set the bit at provided index to 0.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.apache.arrow.vector.ipc.message.ArrowFieldNode;
import org.apache.arrow.vector.types.Types.MinorType;
import org.apache.arrow.vector.types.pojo.ArrowType;
import org.apache.arrow.vector.types.pojo.DictionaryEncoding;
import org.apache.arrow.vector.types.pojo.Field;
import org.apache.arrow.vector.types.pojo.FieldType;
import org.apache.arrow.vector.util.CallBack;
Expand All @@ -77,20 +76,6 @@ public static FixedSizeListVector empty(String name, int size, BufferAllocator a
private int valueCount;
private int validityAllocationSizeInBytes;

/**
* Creates a new instance.
*
* @deprecated use FieldType or static constructor instead.
*/
@Deprecated
public FixedSizeListVector(String name,
BufferAllocator allocator,
int listSize,
DictionaryEncoding dictionary,
CallBack schemaChangeCallback) {
this(name, allocator, new FieldType(true, new ArrowType.FixedSizeList(listSize), dictionary), schemaChangeCallback);
}

/**
* Creates a new instance.
*
Expand Down Expand Up @@ -407,7 +392,7 @@ public void copyFrom(int fromIndex, int thisIndex, ValueVector from) {

@Override
public UnionVector promoteToUnion() {
UnionVector vector = new UnionVector(name, allocator, null);
UnionVector vector = new UnionVector(name, allocator, /* field type */ null, /* call-back */ null);
this.vector.clear();
this.vector = vector;
invalidateReader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ protected void replaceDataVector(FieldVector v) {

@Override
public UnionVector promoteToUnion() {
UnionVector vector = new UnionVector("$data$", allocator, callBack);
UnionVector vector = new UnionVector("$data$", allocator, /* field type */ null, callBack);
replaceDataVector(vector);
invalidateReader();
if (callBack != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.apache.arrow.vector.ipc.message.ArrowFieldNode;
import org.apache.arrow.vector.types.Types.MinorType;
import org.apache.arrow.vector.types.pojo.ArrowType;
import org.apache.arrow.vector.types.pojo.DictionaryEncoding;
import org.apache.arrow.vector.types.pojo.Field;
import org.apache.arrow.vector.types.pojo.FieldType;
import org.apache.arrow.vector.util.CallBack;
Expand Down Expand Up @@ -84,26 +83,6 @@ public static ListVector empty(String name, BufferAllocator allocator) {
*/
private int lastSet;

/**
* Creates a ListVector.
*
* @deprecated Use FieldType or static constructor instead.
*/
@Deprecated
public ListVector(String name, BufferAllocator allocator, CallBack callBack) {
this(name, allocator, FieldType.nullable(ArrowType.List.INSTANCE), callBack);
}

/**
* Creates a ListVector.
*
* @deprecated Use FieldType or static constructor instead.
*/
@Deprecated
public ListVector(String name, BufferAllocator allocator, DictionaryEncoding dictionary, CallBack callBack) {
this(name, allocator, new FieldType(true, ArrowType.List.INSTANCE, dictionary, null), callBack);
}

/**
* Constructs a new instance.
*
Expand Down Expand Up @@ -680,7 +659,7 @@ public ArrowBuf[] getBuffers(boolean clear) {

@Override
public UnionVector promoteToUnion() {
UnionVector vector = new UnionVector("$data$", allocator, callBack);
UnionVector vector = new UnionVector("$data$", allocator, /* field type*/ null, callBack);
replaceDataVector(vector);
invalidateReader();
if (callBack != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,26 +94,6 @@ private Field(String name, FieldType fieldType, List<Field> children, TypeLayout
this.children = children == null ? Collections.emptyList() : children.stream().collect(Collectors.toList());
}

/**
* Creates a new field.
*
* @deprecated Use FieldType or static constructor instead.
*/
@Deprecated
public Field(String name, boolean nullable, ArrowType type, List<Field> children) {
this(name, new FieldType(nullable, type, null, null), children);
}

/**
* Creates a new field.
*
* @deprecated Use FieldType or static constructor instead.
*/
@Deprecated
public Field(String name, boolean nullable, ArrowType type, DictionaryEncoding dictionary, List<Field> children) {
this(name, new FieldType(nullable, type, dictionary, null), children);
}

public Field(String name, FieldType fieldType, List<Field> children) {
this(name, fieldType, children, fieldType == null ? null : TypeLayout.getTypeLayout(fieldType.getType()));
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ public void testConcatBits() {
final int maxCount = 100;
for (int i = 0; i < maxCount; i++) {
if (i % 3 == 0) {
BitVectorHelper.setValidityBitToOne(buf1, i);
BitVectorHelper.setValidityBitToOne(buf2, i);
BitVectorHelper.setBit(buf1, i);
BitVectorHelper.setBit(buf2, i);
}
}

Expand Down Expand Up @@ -199,8 +199,8 @@ public void testConcatBitsInPlace() {
final int maxCount = 100;
for (int i = 0; i < maxCount; i++) {
if (i % 3 == 0) {
BitVectorHelper.setValidityBitToOne(buf1, i);
BitVectorHelper.setValidityBitToOne(buf2, i);
BitVectorHelper.setBit(buf1, i);
BitVectorHelper.setBit(buf2, i);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ public void testEncodeBinaryVector() {
@Test
public void testEncodeUnion() {
// Create a new value vector
try (final UnionVector vector = new UnionVector("vector", allocator, null);
final UnionVector dictionaryVector = new UnionVector("dict", allocator, null);) {
try (final UnionVector vector = new UnionVector("vector", allocator, /* field type */ null, /* call-back */ null);
final UnionVector dictionaryVector =
new UnionVector("dict", allocator, /* field type */ null, /* call-back */ null);) {

final NullableUInt4Holder uintHolder1 = new NullableUInt4Holder();
uintHolder1.value = 10;
Expand Down Expand Up @@ -494,8 +495,9 @@ public void testStructEquals() {

@Test
public void testUnionEquals() {
try (final UnionVector vector1 = new UnionVector("union", allocator, null);
final UnionVector vector2 = new UnionVector("union", allocator, null);) {
try (final UnionVector vector1 = new UnionVector("union", allocator, /* field type */ null, /* call-back */ null);
final UnionVector vector2 =
new UnionVector("union", allocator, /* field type */ null, /* call-back */ null);) {

final NullableUInt4Holder uInt4Holder = new NullableUInt4Holder();
uInt4Holder.value = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@ public void testNestedInList() {

@Test
public void testTransferPair() {
try (FixedSizeListVector from = new FixedSizeListVector("from", allocator, 2, null, null);
FixedSizeListVector to = new FixedSizeListVector("to", allocator, 2, null, null)) {
try (FixedSizeListVector from = new FixedSizeListVector(
"from", allocator, new FieldType(true, new ArrowType.FixedSizeList(2), null), null);
FixedSizeListVector to = new FixedSizeListVector(
"to", allocator, new FieldType(true, new ArrowType.FixedSizeList(2), null), null)) {
Float4Vector nested = (Float4Vector) from.addOrGetVector(FieldType.nullable(MinorType.FLOAT4.getType()))
.getVector();
from.allocateNew();
Expand Down
Loading