asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AsterixDB Code Review <do-not-re...@vitalstatistix.ics.uci.edu>
Subject Change in asterixdb[master]: [NO ISSUE][RT] Randomized Sampling
Date Mon, 02 Dec 2019 22:49:43 GMT
>From Ali Alsuliman <ali.al.solaiman@gmail.com>:

Ali Alsuliman has posted comments on this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223
)

Change subject: [NO ISSUE][RT] Randomized Sampling
......................................................................


Patch Set 1:

(9 comments)

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1//COMMIT_MSG 
Commit Message:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1//COMMIT_MSG@7 
PS1, Line 7: NO ISSUE
Let's use ASTERIXDB-2684


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java

File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java@102

PS1, Line 102: ArrayList
minor, let's make this private final List<ArrayBackedValueStorage>


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java@103

PS1, Line 103: private
minor, let's make this private final


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java@104

PS1, Line 104: int
minor, private int count = 0;


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java@126

PS1, Line 126: samples.clear();
Let's reset the count, here, too. count = 0;


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java@127

PS1, Line 127: rangeMapBits.reset();
             :             // write a dummy integer at the beginning to be filled later with
the actual number of samples taken
             :             IntegerSerializerDeserializer.write(0, rangeMapBits.getDataOutput());
With the new changes, we don't need these lines here, I think. Let's move them down into the
finish() (in the else)


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java@141

PS1, Line 141: storage
minor, let's rename this to sampleStorage (just to not confuse it with the already existing
instance variable)


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java@152

PS1, Line 152: storage
same here


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/LocalSamplingAggregateDescriptor.java@179

PS1, Line 179: IntegerPointable.setInteger(rangeMapBits.getByteArray(), rangeMapBits.getStartOffset(),
samples.size());
After moving the code in the init():
rangeMapBits.reset();
IntegerSerializerDeserializer.write(samples.size(), rangeMapBits.getDataOutput());



-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4223
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I8889f49b127773d90c6ef8a9f09d8993a4da68ac
Gerrit-Change-Number: 4223
Gerrit-PatchSet: 1
Gerrit-Owner: Mikhail Lychagin <mikhail.lychagin@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-CC: Ali Alsuliman <ali.al.solaiman@gmail.com>
Gerrit-Comment-Date: Mon, 02 Dec 2019 22:49:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Mime
View raw message