Skip to content

Commit

Permalink
Fixed more format violations
Browse files Browse the repository at this point in the history
  • Loading branch information
normanj-bitquill committed Jun 12, 2024
1 parent f8897fd commit f5c397d
Show file tree
Hide file tree
Showing 37 changed files with 77 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
* BigIntVector implements a fixed width vector (8 bytes) of integer values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class BigIntVector extends BaseFixedWidthVector implements BaseIntVector, ValueIterableVector<Long> {
public final class BigIntVector extends BaseFixedWidthVector
implements BaseIntVector, ValueIterableVector<Long> {
public static final byte TYPE_WIDTH = 8;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
* DateDayVector implements a fixed width (4 bytes) vector of date values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class DateDayVector extends BaseFixedWidthVector implements ValueIterableVector<Integer> {
public final class DateDayVector extends BaseFixedWidthVector
implements ValueIterableVector<Integer> {

public static final byte TYPE_WIDTH = 4;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* DateMilliVector implements a fixed width vector (8 bytes) of date values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class DateMilliVector extends BaseFixedWidthVector implements ValueIterableVector<LocalDateTime> {
public final class DateMilliVector extends BaseFixedWidthVector
implements ValueIterableVector<LocalDateTime> {
public static final byte TYPE_WIDTH = 8;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
* DecimalVector implements a fixed width vector (16 bytes) of decimal values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class DecimalVector extends BaseFixedWidthVector implements ValueIterableVector<BigDecimal> {
public final class DecimalVector extends BaseFixedWidthVector
implements ValueIterableVector<BigDecimal> {
public static final int MAX_PRECISION = 38;
public static final byte TYPE_WIDTH = 16;
private static final boolean LITTLE_ENDIAN = ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
* duration values which could be null. A validity buffer (bit vector) is maintained to track which
* elements in the vector are null.
*/
public final class DurationVector extends BaseFixedWidthVector implements ValueIterableVector<Duration> {
public final class DurationVector extends BaseFixedWidthVector
implements ValueIterableVector<Duration> {
public static final byte TYPE_WIDTH = 8;

private final TimeUnit unit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
* FixedSizeBinaryVector implements a fixed width vector of binary values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public class FixedSizeBinaryVector extends BaseFixedWidthVector implements ValueIterableVector<byte[]> {
public class FixedSizeBinaryVector extends BaseFixedWidthVector
implements ValueIterableVector<byte[]> {
private final int byteWidth;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
* Float2Vector implements a fixed width (2 bytes) vector of short values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class Float2Vector extends BaseFixedWidthVector implements FloatingPointVector,
ValueIterableVector<Short> {
public final class Float2Vector extends BaseFixedWidthVector
implements FloatingPointVector, ValueIterableVector<Short> {
public static final byte TYPE_WIDTH = 2;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
* Float4Vector implements a fixed width vector (4 bytes) of float values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class Float4Vector extends BaseFixedWidthVector implements FloatingPointVector,
ValueIterableVector<Float> {
public final class Float4Vector extends BaseFixedWidthVector
implements FloatingPointVector, ValueIterableVector<Float> {
public static final byte TYPE_WIDTH = 4;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
* Float8Vector implements a fixed width vector (8 bytes) of double values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class Float8Vector extends BaseFixedWidthVector implements FloatingPointVector,
ValueIterableVector<Double> {
public final class Float8Vector extends BaseFixedWidthVector
implements FloatingPointVector, ValueIterableVector<Double> {
public static final byte TYPE_WIDTH = 8;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
* IntVector implements a fixed width (4 bytes) vector of integer values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class IntVector extends BaseFixedWidthVector implements BaseIntVector, ValueIterableVector<Integer> {
public final class IntVector extends BaseFixedWidthVector
implements BaseIntVector, ValueIterableVector<Integer> {
public static final byte TYPE_WIDTH = 4;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* values which could be null. A validity buffer (bit vector) is maintained to track which elements
* in the vector are null.
*/
public final class IntervalDayVector extends BaseFixedWidthVector implements ValueIterableVector<Duration> {
public final class IntervalDayVector extends BaseFixedWidthVector
implements ValueIterableVector<Duration> {
public static final byte TYPE_WIDTH = 8;
private static final byte MILLISECOND_OFFSET = 4;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* values which could be null. A validity buffer (bit vector) is maintained to track which elements
* in the vector are null.
*/
public final class IntervalYearVector extends BaseFixedWidthVector implements ValueIterableVector<Period> {
public final class IntervalYearVector extends BaseFixedWidthVector
implements ValueIterableVector<Period> {
public static final byte TYPE_WIDTH = 4;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
* NULL. A validity buffer (bit vector) is maintained to track which elements in the vector are
* null. The size of the underlying buffer can be over 2GB.
*/
public final class LargeVarBinaryVector extends BaseLargeVariableWidthVector implements ValueIterableVector<byte[]> {
public final class LargeVarBinaryVector extends BaseLargeVariableWidthVector
implements ValueIterableVector<byte[]> {

/**
* Instantiate a LargeVarBinaryVector. This doesn't allocate any memory for the data in vector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
*
* <p>The offset width of this vector is 8, so the underlying buffer can be larger than 2GB.
*/
public final class LargeVarCharVector extends BaseLargeVariableWidthVector implements ValueIterableVector<Text> {
public final class LargeVarCharVector extends BaseLargeVariableWidthVector
implements ValueIterableVector<Text> {

/**
* Instantiate a LargeVarCharVector. This doesn't allocate any memory for the data in vector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
* SmallIntVector implements a fixed width (2 bytes) vector of short values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class SmallIntVector extends BaseFixedWidthVector implements BaseIntVector, ValueIterableVector<Short> {
public final class SmallIntVector extends BaseFixedWidthVector
implements BaseIntVector, ValueIterableVector<Short> {
public static final byte TYPE_WIDTH = 2;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* which could be null. A validity buffer (bit vector) is maintained to track which elements in the
* vector are null.
*/
public final class TimeMicroVector extends BaseFixedWidthVector implements ValueIterableVector<Long> {
public final class TimeMicroVector extends BaseFixedWidthVector
implements ValueIterableVector<Long> {
public static final byte TYPE_WIDTH = 8;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* which could be null. A validity buffer (bit vector) is maintained to track which elements in the
* vector are null.
*/
public final class TimeNanoVector extends BaseFixedWidthVector implements ValueIterableVector<Long> {
public final class TimeNanoVector extends BaseFixedWidthVector
implements ValueIterableVector<Long> {
public static final byte TYPE_WIDTH = 8;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* could be null. A validity buffer (bit vector) is maintained to track which elements in the vector
* are null.
*/
public final class TimeSecVector extends BaseFixedWidthVector implements ValueIterableVector<Integer> {
public final class TimeSecVector extends BaseFixedWidthVector
implements ValueIterableVector<Integer> {
public static final byte TYPE_WIDTH = 4;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* resolution) values which could be null. A validity buffer (bit vector) is maintained to track
* which elements in the vector are null.
*/
public final class TimeStampMicroTZVector extends TimeStampVector implements ValueIterableVector<Long> {
public final class TimeStampMicroTZVector extends TimeStampVector
implements ValueIterableVector<Long> {
private final String timeZone;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* resolution) values which could be null. A validity buffer (bit vector) is maintained to track
* which elements in the vector are null.
*/
public final class TimeStampMicroVector extends TimeStampVector implements ValueIterableVector<LocalDateTime> {
public final class TimeStampMicroVector extends TimeStampVector
implements ValueIterableVector<LocalDateTime> {

/**
* Instantiate a TimeStampMicroVector. This doesn't allocate any memory for the data in vector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* resolution) values which could be null. A validity buffer (bit vector) is maintained to track
* which elements in the vector are null.
*/
public final class TimeStampMilliVector extends TimeStampVector implements ValueIterableVector<LocalDateTime> {
public final class TimeStampMilliVector extends TimeStampVector
implements ValueIterableVector<LocalDateTime> {

/**
* Instantiate a TimeStampMilliVector. This doesn't allocate any memory for the data in vector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* resolution) values which could be null. A validity buffer (bit vector) is maintained to track
* which elements in the vector are null.
*/
public final class TimeStampNanoTZVector extends TimeStampVector implements ValueIterableVector<Long> {
public final class TimeStampNanoTZVector extends TimeStampVector
implements ValueIterableVector<Long> {
private final String timeZone;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* resolution) values which could be null. A validity buffer (bit vector) is maintained to track
* which elements in the vector are null.
*/
public final class TimeStampNanoVector extends TimeStampVector implements ValueIterableVector<LocalDateTime> {
public final class TimeStampNanoVector extends TimeStampVector
implements ValueIterableVector<LocalDateTime> {

/**
* Instantiate a TimeStampNanoVector. This doesn't allocate any memory for the data in vector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* values which could be null. A validity buffer (bit vector) is maintained to track which elements
* in the vector are null.
*/
public final class TimeStampSecTZVector extends TimeStampVector implements ValueIterableVector<Long> {
public final class TimeStampSecTZVector extends TimeStampVector
implements ValueIterableVector<Long> {
private final String timeZone;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* values which could be null. A validity buffer (bit vector) is maintained to track which elements
* in the vector are null.
*/
public final class TimeStampSecVector extends TimeStampVector implements ValueIterableVector<LocalDateTime> {
public final class TimeStampSecVector extends TimeStampVector
implements ValueIterableVector<LocalDateTime> {

/**
* Instantiate a TimeStampSecVector. This doesn't allocate any memory for the data in vector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
* TinyIntVector implements a fixed width (1 bytes) vector of byte values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class TinyIntVector extends BaseFixedWidthVector implements BaseIntVector, ValueIterableVector<Byte> {
public final class TinyIntVector extends BaseFixedWidthVector
implements BaseIntVector, ValueIterableVector<Byte> {
public static final byte TYPE_WIDTH = 1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* UInt1Vector implements a fixed width (1 bytes) vector of integer values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class UInt1Vector extends BaseFixedWidthVector implements BaseIntVector, ValueIterableVector<Byte> {
public final class UInt1Vector extends BaseFixedWidthVector
implements BaseIntVector, ValueIterableVector<Byte> {
/** The mask to use when promoting the unsigned byte value to an integer. */
public static final int PROMOTION_MASK = 0xFF;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* UInt2Vector implements a fixed width (2 bytes) vector of integer values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class UInt2Vector extends BaseFixedWidthVector implements BaseIntVector, ValueIterableVector<Character> {
public final class UInt2Vector extends BaseFixedWidthVector
implements BaseIntVector, ValueIterableVector<Character> {

/** The maximum 16-bit unsigned integer. */
public static final char MAX_UINT2 = (char) 0XFFFF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* UInt4Vector implements a fixed width (4 bytes) vector of integer values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class UInt4Vector extends BaseFixedWidthVector implements BaseIntVector, ValueIterableVector<Integer> {
public final class UInt4Vector extends BaseFixedWidthVector
implements BaseIntVector, ValueIterableVector<Integer> {

/** The mask to use when promoting the unsigned int value to a long int. */
public static final long PROMOTION_MASK = 0x00000000FFFFFFFFL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* UInt8Vector implements a fixed width vector (8 bytes) of integer values which could be null. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class UInt8Vector extends BaseFixedWidthVector implements BaseIntVector, ValueIterableVector<Long> {
public final class UInt8Vector extends BaseFixedWidthVector
implements BaseIntVector, ValueIterableVector<Long> {

/** The maximum 64-bit unsigned long integer. */
public static final long MAX_UINT8 = 0XFFFFFFFFFFFFFFFFL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.arrow.vector;

import java.util.Iterator;

public interface ValueIterableVector<T> extends ValueVector {
/**
* Get an Iterable that can be used to iterate over the values in the
* vector.
* Get an Iterable that can be used to iterate over the values in the vector.
*
* @return an Iterable for the vector's values
*/
default Iterator<T> getValueIterator() {
return new Iterator<T>() {
private int index = 0;

@Override public boolean hasNext() {
@Override
public boolean hasNext() {
return index < ValueIterableVector.this.getValueCount();
}

@Override public T next() {
@Override
public T next() {
return (T) ValueIterableVector.this.getObject(index++);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
* VarCharVector implements a variable width vector of VARCHAR values which could be NULL. A
* validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class VarCharVector extends BaseVariableWidthVector implements ValueIterableVector<Text> {
public final class VarCharVector extends BaseVariableWidthVector
implements ValueIterableVector<Text> {

/**
* Instantiate a VarCharVector. This doesn't allocate any memory for the data in vector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
* ViewVarBinaryVector implements a variable width view vector of binary values which could be NULL.
* A validity buffer (bit vector) is maintained to track which elements in the vector are null.
*/
public final class ViewVarBinaryVector extends BaseVariableWidthViewVector implements ValueIterableVector<byte[]> {
public final class ViewVarBinaryVector extends BaseVariableWidthViewVector
implements ValueIterableVector<byte[]> {

/**
* Instantiate a ViewVarBinaryVector. This doesn't allocate any memory for the data in vector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
* null. A viewBuffer keeps track of all values in the vector, and an external data buffer is kept
* to keep longer strings (>12).
*/
public final class ViewVarCharVector extends BaseVariableWidthViewVector implements ValueIterableVector<Text> {
public final class ViewVarCharVector extends BaseVariableWidthViewVector
implements ValueIterableVector<Text> {

/**
* Instantiate a ViewVarCharVector. This doesn't allocate any memory for the data in vector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
*
* The latter two are managed by its superclass.
*/
public class ListVector extends BaseRepeatedValueVector implements PromotableVector, ValueIterableVector<List<?>> {
public class ListVector extends BaseRepeatedValueVector
implements PromotableVector, ValueIterableVector<List<?>> {

public static ListVector empty(String name, BufferAllocator allocator) {
return new ListVector(name, allocator, FieldType.nullable(ArrowType.List.INSTANCE), null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
* A struct vector that has no null values (and no validity buffer). Child Vectors are handled in
* {@link AbstractStructVector}.
*/
public class NonNullableStructVector extends AbstractStructVector implements ValueIterableVector<Map<String, ?>> {
public class NonNullableStructVector extends AbstractStructVector
implements ValueIterableVector<Map<String, ?>> {

/**
* Construct a new empty instance which replaces an existing field with the new one in case of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
* A Struct vector consists of nullability/validity buffer and children vectors that make up the
* struct's fields. The children vectors are handled by the parent class.
*/
public class StructVector extends NonNullableStructVector implements FieldVector, ValueIterableVector<Map<String, ?>> {
public class StructVector extends NonNullableStructVector
implements FieldVector, ValueIterableVector<Map<String, ?>> {

/**
* Construct a new empty instance which replaces an existing field with the new one in case of
Expand Down

0 comments on commit f5c397d

Please sign in to comment.