Skip to content

Commit

Permalink
Adjusted test parameters and corrected some initialization in UpdateBy (
Browse files Browse the repository at this point in the history
  • Loading branch information
lbooker42 authored Jan 3, 2024
1 parent 3af6d49 commit 933f338
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ class BucketedPartitionedUpdateByManager extends UpdateBy {
}, source::isRefreshing, DynamicNode::isRefreshing);

if (source.isRefreshing()) {
// this is a refreshing source, we will need a listener
sourceListener = newUpdateByListener();
source.addUpdateListener(sourceListener);
// result will depend on listener
result.addParentReference(sourceListener);

// create input and output modified column sets
forAllOperators(op -> {
op.createInputModifiedColumnSet(source);
Expand All @@ -121,6 +115,12 @@ class BucketedPartitionedUpdateByManager extends UpdateBy {
transformFailureListener = new TransformFailureListener(transformedTable);
transformedTable.addUpdateListener(transformFailureListener);
result.addParentReference(transformFailureListener);

// this is a refreshing source, we will need a listener
sourceListener = newUpdateByListener();
source.addUpdateListener(sourceListener);
// result will depend on listener
result.addParentReference(sourceListener);
} else {
sourceListener = null;
mcsTransformer = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ public class ZeroKeyUpdateByManager extends UpdateBy {
if (source.isRefreshing()) {
result = new QueryTable(source.getRowSet(), resultSources);

// this is a refreshing source, we will need a listener
sourceListener = newUpdateByListener();
source.addUpdateListener(sourceListener);
// result will depend on listener
result.addParentReference(sourceListener);

// create input and output modified column sets
forAllOperators(op -> {
op.createInputModifiedColumnSet(source);
Expand All @@ -80,6 +74,12 @@ public class ZeroKeyUpdateByManager extends UpdateBy {

// result will depend on zeroKeyUpdateBy
result.addParentReference(zeroKeyUpdateBy.result);

// this is a refreshing source, we will need a listener
sourceListener = newUpdateByListener();
source.addUpdateListener(sourceListener);
// result will depend on listener
result.addParentReference(sourceListener);
} else {
zeroKeyUpdateBy = new UpdateByBucketHelper(bucketDescription, source, windows, resultSources,
timestampColumnName, control, (oe, se) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2791,8 +2791,7 @@ public void testTDigestIncremental() {
final QueryTable queryTable = getTable(size, random,
columnInfos = initColumnInfos(new String[] {"Sym", "doubleCol", "longCol"},
new SetGenerator<>("a", "b", "c", "d"),
// TODO (deephaven-core#4743) verify this change in range
new DoubleGenerator(0, 10000, 0.05, 0.05),
new DoubleGenerator(10.1, 20.1, 0.05, 0.05),
new LongGenerator(0, 1_000_000_000L)));

final Collection<? extends Aggregation> aggregations = List.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ static CreateResult createTestTable(int tableSize,
new ShortGenerator((short) -6000, (short) 65535, .1),
new IntGenerator(10, 100, .1),
new LongGenerator(10, 100, .1),
// TODO (deephaven-core#4743) verify this change in range
new FloatGenerator(0, 100, .1),
new FloatGenerator(10.1F, 20.1F, .1),
new DoubleGenerator(10.1, 20.1, .1),
new BooleanGenerator(.5, .1),
new BigIntegerGenerator(new BigInteger("-10"), new BigInteger("10"), .1),
Expand Down

0 comments on commit 933f338

Please sign in to comment.