-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review78883
-----------------------------------------------------------



lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java
<https://reviews.apache.org/r/30251/#comment127970>

    If this is optional attribute, consider defining it as Optional<Long> 
numOfDistinctValues. Data Model becomes more readable with it.



lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java
<https://reviews.apache.org/r/30251/#comment127971>

    constraint missing. I guess checkArgument(numOfDistinctValues > 0) is a 
straight forward constraint for this field.
    
    If present the field should be > 0 or else it should be Optional.<Long> 
absent()



lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java
<https://reviews.apache.org/r/30251/#comment127972>

    This function isSetNumOfDistinctValues will not be required once 
numOfDistinctValues is changed to Optional<Long>. 
numOfDistinctValues.isPresent() of Guava will work in place of this. And 
constraint of being > 0 when present in constructor will make sure that when it 
is initialized, it is in valid state.



lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java
<https://reviews.apache.org/r/30251/#comment127973>

    Parsing exception not handled here.



lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java
<https://reviews.apache.org/r/30251/#comment127974>

    Can @ToString(callSuper=true) of lombok  work in place of this ?



lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java
<https://reviews.apache.org/r/30251/#comment127969>

    An alternative to -1 is making the attribute as Optional in data model and 
return Optional.<Long> absent() when a value is not initialized for it.


- Himanshu Gahlaut


On April 1, 2015, 1:13 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 1:13 a.m.)
> 
> 
> Review request for lens, Amareshwari Sriramadasu and Jaideep dhok.
> 
> 
> Bugs: LENS-68
>     https://issues.apache.org/jira/browse/LENS-68
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> Dim attributes should contain number of possible distinct values it can take. 
> This can be an approximate number. This would give an idea of how big the 
> grouping will be when an attribute is chosen for groupby expressions
> 
> 
> Diffs
> -----
> 
>   lens-api/src/main/resources/cube-0.1.xsd 18ee682 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 
> c4efe52 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 
> e23bd8c 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 
> 7e6360e 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 
> 0be8e5f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java
>  859b344 
>   
> lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java
>  baa659c 
>   lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 
> 138797e 
>   
> lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java
>  933714c 
> 
> Diff: https://reviews.apache.org/r/30251/diff/
> 
> 
> Testing
> -------
> 
> Added a checks in the existing unit tests
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>

Reply via email to