Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QST #715

Merged
merged 54 commits into from
Jul 29, 2021
Merged

QST #715

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
dc0b016
Added qst
devinrsmith Jul 20, 2021
6e3444d
Make qst array serializable
devinrsmith Jul 21, 2021
1d9930e
Hack around #875
devinrsmith Jul 21, 2021
c591b34
Updated graphviz with better library that can output to a bunch of fo…
devinrsmith Jul 22, 2021
722d5bb
fix formatting
devinrsmith Jul 22, 2021
ea002a6
KnownColumnTypes visitor isn't expecting custom
devinrsmith Jul 22, 2021
1e32fae
move known types to KnownColumnTypes
devinrsmith Jul 22, 2021
d71b669
remove ColumnHeaderX static builders
devinrsmith Jul 23, 2021
fe5b5f3
NewTable / ColumnHeader review updates
devinrsmith Jul 23, 2021
62bec7a
Default builder capacity
devinrsmith Jul 23, 2021
77d5b98
Table.of return type
devinrsmith Jul 23, 2021
336d6f6
Create io.deephaven.annotations
devinrsmith Jul 23, 2021
fadfa32
remove header visitor
devinrsmith Jul 23, 2021
b393666
Review response around merge
devinrsmith Jul 23, 2021
eb82265
depth-first -> post-order
devinrsmith Jul 23, 2021
eed873a
TableCreation.of -> merge
devinrsmith Jul 23, 2021
6741d6c
reorder visitors
devinrsmith Jul 23, 2021
23e16d2
remove Type.cast
devinrsmith Jul 23, 2021
e054de3
Check cast throws exception on invalid assign
devinrsmith Jul 23, 2021
f76ed5a
Scope of AllowNulls
devinrsmith Jul 23, 2021
1d1b470
remove iterable->collection methods
devinrsmith Jul 23, 2021
f74f396
remove generic array getters
devinrsmith Jul 23, 2021
63e4289
primitive array systemcopy
devinrsmith Jul 23, 2021
5d8abe9
use the ArrayBackedColumnSource helpers to construct the appropriate …
devinrsmith Jul 23, 2021
d66016b
Instant/DBDateTime
devinrsmith Jul 23, 2021
7df96cd
add explicit timeTable constructor
devinrsmith Jul 23, 2021
de11205
TimeTable id
devinrsmith Jul 23, 2021
cbdb7ff
TimeTable interval
devinrsmith Jul 23, 2021
41e3739
javadoc on Table deser
devinrsmith Jul 23, 2021
c18ca4a
remove overloads on Table
devinrsmith Jul 23, 2021
1af13eb
fix nanos
devinrsmith Jul 23, 2021
fcef3c6
remove selectable base restrictions
devinrsmith Jul 23, 2021
40d93e1
rename snapshot right to baseTable
devinrsmith Jul 23, 2021
7bfe725
TypeHelper
devinrsmith Jul 23, 2021
947c46b
move qst array constants into Util
devinrsmith Jul 23, 2021
191f0d0
make Ryan feel good
devinrsmith Jul 23, 2021
2b9ce00
Add primitive helpers to Column
devinrsmith Jul 23, 2021
5d1e488
null long
devinrsmith Jul 23, 2021
9fa65a6
move adapts to Util
devinrsmith Jul 23, 2021
3629369
remove graphviz from PR
devinrsmith Jul 23, 2021
5a45d03
row N varargs check
devinrsmith Jul 26, 2021
1c0a360
ColumnHeader param name
devinrsmith Jul 26, 2021
0595683
non-reflective primitive array builders
devinrsmith Jul 26, 2021
6344469
fix unit test, create getMemoryColumnSourceForBoolean
devinrsmith Jul 26, 2021
2a129d2
TableCreation javadoc
devinrsmith Jul 26, 2021
0f70db6
Fixup BooleanArray. Add addImpl for more efficient boxed varargs cons…
devinrsmith Jul 26, 2021
f2e5382
Revert "remove iterable->collection methods"
devinrsmith Jul 26, 2021
7dd0c2b
remove unused method
devinrsmith Jul 26, 2021
8253f12
Merge remote-tracking branch 'upstream/main' into tmp
devinrsmith Jul 29, 2021
0d8bee7
SnapshotTable does initial snapshot by default
devinrsmith Jul 29, 2021
64e5260
getBooleanMemoryColumnSource
devinrsmith Jul 29, 2021
062bafe
allow Head/TailTable w/ zero size
devinrsmith Jul 29, 2021
99613c4
rename qst Table -> TableSpec
devinrsmith Jul 29, 2021
597328d
Javadocs
devinrsmith Jul 29, 2021
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 qst/src/main/java/io/deephaven/qst/array/Array.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import java.io.Serializable;
import java.util.Collection;
import java.util.stream.Stream;

/**
* Provides strong typing around an array-like object.
Expand All @@ -13,7 +12,7 @@
* @see PrimitiveArray
* @see GenericArray
*/
public interface Array<T> extends Iterable<T>, Serializable {
public interface Array<T> extends Serializable {

static <T> ArrayBuilder<T, ?, ?> builder(Type<T> type) {
return TypeToArrayBuilder.of(type, Util.DEFAULT_BUILDER_INITIAL_CAPACITY);
Expand All @@ -39,10 +38,6 @@ static <T> Array<T> of(Type<T> type, Collection<T> data) {

int size();

T get(int index);

Stream<T> stream();

<V extends Visitor> V walk(V visitor);

interface Visitor {
Expand Down
33 changes: 0 additions & 33 deletions qst/src/main/java/io/deephaven/qst/array/ArrayBase.java

This file was deleted.

17 changes: 6 additions & 11 deletions qst/src/main/java/io/deephaven/qst/array/BooleanArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ public final byte[] values() {
return values;
}

@Override
public final Boolean get(int index) {
return adapt(values[index]);
}

@Override
public final int size() {
return values().length;
Expand Down Expand Up @@ -110,44 +105,44 @@ private Builder(int initialCapacity) {
this.size = 0;
}

public synchronized final Builder add(boolean item) {
public final Builder add(boolean item) {
ensureCapacity();
array[size++] = adapt(item);
return this;
}

public synchronized final Builder add(boolean... items) {
public final Builder add(boolean... items) {
for (boolean item : items) {
add(item);
}
return this;
}

@Override
public synchronized final Builder add(Boolean item) {
public final Builder add(Boolean item) {
ensureCapacity();
array[size++] = adapt(item);
return this;
}

@Override
public synchronized final Builder add(Boolean... items) {
public final Builder add(Boolean... items) {
for (Boolean item : items) {
add(item);
}
return this;
}

@Override
public synchronized final Builder add(Iterable<Boolean> items) {
public final Builder add(Iterable<Boolean> items) {
for (Boolean item : items) {
add(item);
}
return this;
}

@Override
public synchronized final BooleanArray build() {
public final BooleanArray build() {
return new BooleanArray(takeAtSize());
}

Expand Down
17 changes: 6 additions & 11 deletions qst/src/main/java/io/deephaven/qst/array/ByteArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ public final byte[] values() {
return values;
}

@Override
public final Byte get(int index) {
return adapt(values[index]);
}

@Override
public final int size() {
return values().length;
Expand Down Expand Up @@ -102,13 +97,13 @@ private Builder(int initialCapacity) {
this.size = 0;
}

public synchronized final Builder add(byte item) {
public final Builder add(byte item) {
ensureCapacity();
array[size++] = item;
return this;
}

public synchronized final Builder add(byte... items) {
public final Builder add(byte... items) {
// todo: systemcopy
devinrsmith marked this conversation as resolved.
Show resolved Hide resolved
for (byte item : items) {
add(item);
Expand All @@ -117,28 +112,28 @@ public synchronized final Builder add(byte... items) {
}

@Override
public synchronized final Builder add(Byte item) {
public final Builder add(Byte item) {
return add(adapt(item));
}

@Override
public synchronized final Builder add(Byte... items) {
public final Builder add(Byte... items) {
for (Byte item : items) {
add(item);
rcaudy marked this conversation as resolved.
Show resolved Hide resolved
}
return this;
}

@Override
public synchronized final Builder add(Iterable<Byte> items) {
public final Builder add(Iterable<Byte> items) {
for (Byte item : items) {
add(item);
}
return this;
}

@Override
public synchronized final ByteArray build() {
public final ByteArray build() {
return new ByteArray(takeAtSize());
}

Expand Down
17 changes: 6 additions & 11 deletions qst/src/main/java/io/deephaven/qst/array/CharArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public final char[] values() {
return values;
}

@Override
public final Character get(int index) {
return adapt(values[index]);
}

@Override
public final int size() {
return values().length;
Expand Down Expand Up @@ -103,13 +98,13 @@ private Builder(int initialCapacity) {
this.size = 0;
}

public synchronized final Builder add(char item) {
public final Builder add(char item) {
ensureCapacity();
array[size++] = item;
return this;
}

public synchronized final Builder add(char... items) {
public final Builder add(char... items) {
// todo: systemcopy
for (char item : items) {
add(item);
Expand All @@ -118,28 +113,28 @@ public synchronized final Builder add(char... items) {
}

@Override
public synchronized final Builder add(Character item) {
public final Builder add(Character item) {
return add(adapt(item));
}

@Override
public synchronized final Builder add(Character... items) {
public final Builder add(Character... items) {
for (Character item : items) {
add(item);
}
return this;
}

@Override
public synchronized final Builder add(Iterable<Character> items) {
public final Builder add(Iterable<Character> items) {
for (Character item : items) {
add(item);
}
return this;
}

@Override
public synchronized final CharArray build() {
public final CharArray build() {
return new CharArray(takeAtSize());
}

Expand Down
23 changes: 9 additions & 14 deletions qst/src/main/java/io/deephaven/qst/array/DoubleArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public static Builder builder(int initialSize) {
return new Builder(initialSize);
}

private static double adapt(Double x) {
private static double unbox(Double x) {
rcaudy marked this conversation as resolved.
Show resolved Hide resolved
return x == null ? NULL_REPR : x;
}

private static Double adapt(double x) {
private static Double box(double x) {
return x == NULL_REPR ? null : x;
}

Expand All @@ -56,11 +56,6 @@ public final double[] values() {
return values;
}

@Override
public final Double get(int index) {
return adapt(values[index]);
}

@Override
public final int size() {
return values().length;
Expand Down Expand Up @@ -102,13 +97,13 @@ private Builder(int initialCapacity) {
this.size = 0;
}

public synchronized final Builder add(double item) {
public final Builder add(double item) {
ensureCapacity();
array[size++] = item;
return this;
}

public synchronized final Builder add(double... items) {
public final Builder add(double... items) {
// todo: systemcopy
for (double item : items) {
add(item);
Expand All @@ -117,28 +112,28 @@ public synchronized final Builder add(double... items) {
}

@Override
public synchronized final Builder add(Double item) {
return add(adapt(item));
public final Builder add(Double item) {
return add(unbox(item));
}

@Override
public synchronized final Builder add(Double... items) {
public final Builder add(Double... items) {
for (Double item : items) {
add(item);
}
return this;
}

@Override
public synchronized final Builder add(Iterable<Double> items) {
public final Builder add(Iterable<Double> items) {
for (Double item : items) {
add(item);
}
return this;
}

@Override
public synchronized final DoubleArray build() {
public final DoubleArray build() {
return new DoubleArray(takeAtSize());
}

Expand Down
17 changes: 6 additions & 11 deletions qst/src/main/java/io/deephaven/qst/array/FloatArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public final float[] values() {
return values;
}

@Override
public final Float get(int index) {
return adapt(values[index]);
}

@Override
public final int size() {
return values().length;
Expand Down Expand Up @@ -103,13 +98,13 @@ private Builder(int initialCapacity) {
this.size = 0;
}

public synchronized final Builder add(float item) {
public final Builder add(float item) {
ensureCapacity();
array[size++] = item;
return this;
}

public synchronized final Builder add(float... items) {
public final Builder add(float... items) {
// todo: systemcopy
for (float item : items) {
add(item);
Expand All @@ -118,28 +113,28 @@ public synchronized final Builder add(float... items) {
}

@Override
public synchronized final Builder add(Float item) {
public final Builder add(Float item) {
return add(adapt(item));
}

@Override
public synchronized final Builder add(Float... items) {
public final Builder add(Float... items) {
for (Float item : items) {
add(item);
}
return this;
}

@Override
public synchronized final Builder add(Iterable<Float> items) {
public final Builder add(Iterable<Float> items) {
for (Float item : items) {
add(item);
}
return this;
}

@Override
public synchronized final FloatArray build() {
public final FloatArray build() {
return new FloatArray(takeAtSize());
}

Expand Down
Loading