Skip to content

Commit

Permalink
Change dimension field reponse serilization from static to dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
garyluoex committed Jan 14, 2017
1 parent 5308c3c commit 54acd7a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ Current
-------

### Added:

- [Dimension Field Tagging and Dynamic Dimension Field Serilization](https://github.com/yahoo/fili/pull/137)
* Added a new module `fili-navi` for components added to support for Navi
* Added `TaggedDimensionField` and related components in `fili-navi`

- [Added RegisteredLookupDimension and RegisteredLookupExtractionFunction](https://github.com/yahoo/fili/pull/132)
* Added support for druid's RegisteredLookup by adding `RegisteredLookupDimension` and `RegisteredLookupExtractionFunction`
* Added test for `RegisteredLookupDimension` serialization in `RegisteredLookupDimensionToDimensionSpecSpec`
Expand Down Expand Up @@ -39,6 +44,9 @@ Current

### Changed:

- [Dimension Field Tagging and Dynamic Dimension Field Serilization](https://github.com/yahoo/fili/pull/137)
* Changed `fili-core` dimension endpoint `DimensionField` serialization strategy from hard coded static attributes to dynamic serialization based on `jackson` serializer

- [MetricMaker cleanup and simplification](https://github.com/yahoo/fili/pull/127)
* Simplified raw aggregation makers
* `ConstantMaker` now throws an `IllegalArgumentException` wrapping the raw NumberFormatException on a bad argument
Expand Down Expand Up @@ -169,6 +177,10 @@ Current

### Deprecated:

- [Dimension Field Tagging and Dynamic Dimension Field Serilization](https://github.com/yahoo/fili/pull/137)
* Deprecated `DimensionsServlet::getDimensionFieldListSummaryView` and `DimensionsServlet::getDimensionFieldSummaryView`
since there is no need for it anymore due to the change in serialization of `DimensionField`

- [MetricMaker cleanup and simplification](https://github.com/yahoo/fili/pull/127)
* `AggregationAverageMaker` deprecated conversion method required by deprecated sketch library

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public static Map<String, Object> getDimensionFullView(
resultRow.put("name", dimension.getApiName());
resultRow.put("longName", dimension.getLongName());
resultRow.put("description", dimension.getDescription());
resultRow.put("fields", getDimensionFieldListSummaryView(dimension.getDimensionFields()));
resultRow.put("fields", dimension.getDimensionFields());
resultRow.put("values", getDimensionValuesUrl(dimension, uriInfo));
resultRow.put("cardinality", dimension.getCardinality());
resultRow.put(
Expand All @@ -404,7 +404,10 @@ public static Map<String, Object> getDimensionFullView(
* @param dimensionFields Collection of dimension fields to get the summary view for
*
* @return Summary list view of the dimension fields
*
* @deprecated should be private, now the internal usage need is gone, will deprecate in case someone is using it
*/
@Deprecated
public static Set<Map<String, String>> getDimensionFieldListSummaryView(
Collection<DimensionField> dimensionFields
) {
Expand All @@ -419,7 +422,10 @@ public static Set<Map<String, String>> getDimensionFieldListSummaryView(
* @param dimensionField Dimension Field to get the view of
*
* @return Summary view of the dimension field
*
* @deprecated should be private, now the internal usage need is gone, will deprecate in case someone is using it
*/
@Deprecated
public static Map<String, String> getDimensionFieldSummaryView(DimensionField dimensionField) {
Map<String, String> resultRow = new LinkedHashMap<>();
resultRow.put("name", dimensionField.getName());
Expand Down
2 changes: 1 addition & 1 deletion fili-navi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
<type>test-jar</type>
</dependency>
</dependencies>
</project>
</project>
2 changes: 1 addition & 1 deletion fili-navi/src/main/resources/moduleConfig.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016 Yahoo Inc.
# Copyright 2017 Yahoo Inc.
# Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.

#The name of this module (required)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class TaggedDimensionFieldSpec extends Specification {
dimensionField1.getDescription() == "testPrimaryKey description"
dimensionField1.getTags() == [PRIMARY_KEY]
dimensionField2.getTags() == []

}

def "Tagged dimension fields serialize as expected"() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016 Yahoo Inc.
# Copyright 2017 Yahoo Inc.
# Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.

#The name of this module (required)
Expand Down

0 comments on commit 54acd7a

Please sign in to comment.