Skip to content

Commit

Permalink
fixing style inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyaberdnikov committed Sep 18, 2023
1 parent 38ea73e commit f9a1c0a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private NewTable newTable() {
Instant.now(), "abc".getBytes())
.row(null, null, null, null, null, null, null, null, null, (Instant) null, (byte[]) null)
.row(false, (byte) -42, 'b', (short) -32_000, -1234567, -1234567890123L, -3.14f, -3.14d, "Goodbye.",
Instant.ofEpochMilli(0), new byte[]{0x32, 0x02, 0x17, 0x42} )
Instant.ofEpochMilli(0), new byte[] {0x32, 0x02, 0x17, 0x42})
.newTable();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ class AddToInputTable extends FlightExampleBase {
@Override
protected void execute(FlightSession flight) throws Exception {
final var header = ColumnHeader.of(
ColumnHeader.ofBoolean("Boolean"),
ColumnHeader.ofByte("Byte"),
ColumnHeader.ofChar("Char"),
ColumnHeader.ofShort("Short"),
ColumnHeader.ofInt("Int"),
ColumnHeader.ofLong("Long"),
ColumnHeader.ofFloat("Float"),
ColumnHeader.ofDouble("Double"),
ColumnHeader.ofString("String"),
ColumnHeader.ofInstant("Instant"),
ColumnHeader.of("ByteVector", byte[].class));
ColumnHeader.ofBoolean("Boolean"),
ColumnHeader.ofByte("Byte"),
ColumnHeader.ofChar("Char"),
ColumnHeader.ofShort("Short"),
ColumnHeader.ofInt("Int"),
ColumnHeader.ofLong("Long"),
ColumnHeader.ofFloat("Float"),
ColumnHeader.ofDouble("Double"),
ColumnHeader.ofString("String"),
ColumnHeader.ofInstant("Instant"),
ColumnHeader.of("ByteVector", byte[].class));
final TableSpec timestamp = InMemoryAppendOnlyInputTable.of(TableHeader.of(header));
final TableSpec timestampLastBy =
timestamp.aggBy(Collections.singletonList(Aggregation.AggLast("Instant")));
Expand All @@ -54,10 +54,10 @@ protected void execute(FlightSession flight) throws Exception {

while (true) {
// Add a new row, at least once every second
final NewTable newRow = header.row(true, (byte) 42, 'a', (short) 32_000, 1234567, 1234567890123L, 3.14f, 3.14d, "Hello, World",
Instant.now(), "abc".getBytes()).newTable();
final NewTable newRow = header.row(true, (byte) 42, 'a', (short) 32_000, 1234567, 1234567890123L, 3.14f,
3.14d, "Hello, World", Instant.now(), "abc".getBytes()).newTable();
flight.addToInputTable(timestampHandle, newRow, bufferAllocator).get(5, TimeUnit.SECONDS);
Thread.sleep(ThreadLocalRandom.current().nextLong(100000));
Thread.sleep(ThreadLocalRandom.current().nextLong(1000));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public Field visit(InstantType instantType) {

@Override
public Field visit(ArrayType<?, ?> arrayType) {
if(arrayType.componentType().equals(Type.find(byte.class))) {
if (arrayType.componentType().equals(Type.find(byte.class))) {
return byteVectorField(name);
} else {
throw new UnsupportedOperationException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public FieldVector visit(InstantType instantType) {

@Override
public FieldVector visit(ArrayType<?, ?> arrayType) {
if(arrayType.componentType().equals(Type.find(byte.class))) {
if (arrayType.componentType().equals(Type.find(byte.class))) {
return visitByteVectorArray(generic.cast(arrayType));
} else {
throw new UnsupportedOperationException();
Expand Down Expand Up @@ -270,7 +270,7 @@ FieldVector visitStringArray(GenericArray<String> stringArray) {
FieldVector visitByteVectorArray(GenericArray<?> byteVectorArray) {
Field field = FieldAdapter.byteVectorField(name);
VarBinaryVector vector = new VarBinaryVector(field, allocator);
VectorHelper.fill(vector, (List<byte[]>)byteVectorArray.values());
VectorHelper.fill(vector, (List<byte[]>) byteVectorArray.values());
return vector;
}

Expand Down

0 comments on commit f9a1c0a

Please sign in to comment.