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

v2.14 release #107

Merged
merged 29 commits into from
Aug 10, 2019
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9de170e
Add errorBoundsStdDev to ThetaSketch postAggregation. Allow dimension…
Nov 26, 2018
b5a6a7b
use builder, remove primitive, change jackson annotation
Dec 7, 2018
06e5c33
non-null dimensionin groupByQuery
Dec 7, 2018
a7105ae
Add virtual columns support.
vchimishuk Feb 19, 2019
1fc7bcb
Add virtual column support also for scan, search and select queries. …
vchimishuk Feb 28, 2019
f2f32bc
Updated Jackson version to 2.9.9
gagangupt16 May 28, 2019
d1b34bd
Merge pull request #66 from st0ckface/allow-null-dimension
abhi-zapr Jun 15, 2019
90c3531
change constructor to builder in test cases
Jun 15, 2019
a6688cc
two constructor rather than a builder because builder would be breaki…
Jun 22, 2019
2b660a7
Quantiles and Tuple Sketches Implementation
abhi-zapr Aug 1, 2019
4dae1d4
Update pom.xml
siddharthsa Aug 2, 2019
2dd68e8
HLL sketch implementation & copyright licenses in all files
abhi-zapr Aug 3, 2019
3691f0c
readme update for data sketches
abhi-zapr Aug 3, 2019
b32815e
refactoring
abhi-zapr Aug 3, 2019
1637e5d
refactoring README
abhi-zapr Aug 3, 2019
debbd92
datasketches test cases
abhi-zapr Aug 3, 2019
aa69bbd
EqualsAndHashCode
abhi-zapr Aug 3, 2019
1d3726b
Version bumped to 2.14-SNAPSHOT
abhi-zapr Aug 10, 2019
865f0db
spellCheck refactor
abhi-zapr Aug 10, 2019
79e134b
Merge pull request #99 from abhi195/thetaSketch-errorBoundsStdDev
abhi-zapr Aug 10, 2019
552a7c6
Merge pull request #105 from zapr-oss/thetaSketch-errorBoundsStdDev
abhi-zapr Aug 10, 2019
43cb048
conflict resolve
abhi-zapr Aug 10, 2019
301b063
Merge pull request #86 from vchimishuk/virtual-columns
abhi-zapr Aug 10, 2019
b196b50
Merge pull request #93 from gagangupt16/JacksonDependencyUpdate
abhi-zapr Aug 10, 2019
48fdac3
seperating databind and datatype version
abhi-zapr Aug 10, 2019
c116366
Merge branch 'develop' into patch-1
abhi-zapr Aug 10, 2019
0ba852d
Merge pull request #102 from siddharthsa/patch-1
abhi-zapr Aug 10, 2019
611f6d9
Merge pull request #103 from abhi195/data-sketches
abhi-zapr Aug 10, 2019
3ac68c0
Version bumped to 2.14 for next release
abhi-zapr Aug 10, 2019
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>in.zapr.druid</groupId>
<artifactId>druidry</artifactId>
<version>2.13</version>
<version>2.14-SNAPSHOT</version>

<name>Druidry - Druid Java Client</name>
<description>Druidry is an open-source Java based utility library which supports creating
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,22 @@

package in.zapr.druid.druidry.extensions.datasketches.postAggregator;

import com.fasterxml.jackson.annotation.JsonInclude;

import in.zapr.druid.druidry.postAggregator.DruidPostAggregator;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NonNull;

@Getter
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode(callSuper = true)
public class ThetaSketchEstimatePostAggregator extends DruidPostAggregator {

private static final String THETA_SKETCH_ESTIMATE_POST_AGGREGATOR_TYPE = "thetaSketchEstimate";

private DruidPostAggregator field;
private Integer errorBoundsStdDev;

public ThetaSketchEstimatePostAggregator(@NonNull String name,
@NonNull DruidPostAggregator field) {
Expand All @@ -36,4 +40,11 @@ public ThetaSketchEstimatePostAggregator(@NonNull String name,
this.field = field;
}

public ThetaSketchEstimatePostAggregator(@NonNull String name,
@NonNull DruidPostAggregator field,
Integer errorBoundsStdDev) {
this(name, field);
this.errorBoundsStdDev = errorBoundsStdDev;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public class DruidGroupByQuery extends DruidAggregationQuery {

private DefaultLimitSpec limitSpec;
private String having;

@NonNull
private List<DruidDimension> dimensions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private JSONObject getFieldAccessJSON() throws JSONException {
}

@Test
public void testAllFieldsWithFieldAccess() throws JsonProcessingException, JSONException {
public void testRequiredFieldsWithFieldAccess() throws JsonProcessingException, JSONException {

FieldAccessPostAggregator fieldAccessPostAggregator =
new FieldAccessPostAggregator("stars");
Expand All @@ -71,6 +71,30 @@ public void testAllFieldsWithFieldAccess() throws JsonProcessingException, JSONE

}

@Test
public void testAllFieldsWithFieldAccess() throws JsonProcessingException, JSONException {

FieldAccessPostAggregator fieldAccessPostAggregator =
new FieldAccessPostAggregator("stars");

ThetaSketchEstimatePostAggregator thetaSketchEstimatePostAggregator =
new ThetaSketchEstimatePostAggregator("estimate_stars", fieldAccessPostAggregator, 2);


JSONObject fieldAccess = getFieldAccessJSON();

JSONObject jsonObject = new JSONObject();
jsonObject.put("type", "thetaSketchEstimate");
jsonObject.put("name", "estimate_stars");
jsonObject.put("errorBoundsStdDev", 2);
jsonObject.put("field", fieldAccess);

String actualJSON = objectMapper.writeValueAsString(thetaSketchEstimatePostAggregator);
String expectedJSON = jsonObject.toString();
JSONAssert.assertEquals(expectedJSON, actualJSON, JSONCompareMode.NON_EXTENSIBLE);

}

@Test
public void testAllFieldsWithThetaSketchSetOp() throws JsonProcessingException, JSONException {

Expand All @@ -84,7 +108,7 @@ public void testAllFieldsWithThetaSketchSetOp() throws JsonProcessingException,
.build();

ThetaSketchEstimatePostAggregator thetaSketchEstimatePostAggregator =
new ThetaSketchEstimatePostAggregator("estimate_stars", thetaSketchSetOpPostAggregator);
new ThetaSketchEstimatePostAggregator("estimate_stars", thetaSketchSetOpPostAggregator, 2);


JSONObject fieldAccess = getFieldAccessJSON();
Expand All @@ -100,6 +124,7 @@ public void testAllFieldsWithThetaSketchSetOp() throws JsonProcessingException,
JSONObject jsonObject = new JSONObject();
jsonObject.put("type", "thetaSketchEstimate");
jsonObject.put("name", "estimate_stars");
jsonObject.put("errorBoundsStdDev", 2);
jsonObject.put("field", thetaSketchSetOp);

String actualJSON = objectMapper.writeValueAsString(thetaSketchEstimatePostAggregator);
Expand Down