You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by Raju Bairishetti <ra...@gmail.com> on 2015/01/30 03:29:34 UTC

Re: Review Request 30251: LENS68: Add number of possible distinct values for dim-attributes

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

(Updated Jan. 30, 2015, 2:29 a.m.)


Review request for lens, Amareshwari Sriramadasu and Jaideep dhok.


Summary (updated)
-----------------

LENS68: Add number of possible distinct values for dim-attributes 


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 f75ea60 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
  lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
  lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
  lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 

Diff: https://reviews.apache.org/r/30251/diff/


Testing
-------

Added a checks in the existing unit tests


Thanks,

Raju Bairishetti


Re: Review Request 30251: LENS68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.

> On Jan. 30, 2015, 6:26 a.m., Rajat Khandelwal wrote:
> > lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java, line 418
> > <https://reviews.apache.org/r/30251/diff/2/?file=841182#file841182line418>
> >
> >     Why do we need to make a `longValue()` call here?

just checking the premitive long type values..


- Raju


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


On Jan. 30, 2015, 2:29 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 2:29 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 f75ea60 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
>   lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
>   lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
>   lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 
> 
> Diff: https://reviews.apache.org/r/30251/diff/
> 
> 
> Testing
> -------
> 
> Added a checks in the existing unit tests
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>


Re: Review Request 30251: LENS68: Add number of possible distinct values for dim-attributes

Posted by Rajat Khandelwal <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review70322
-----------------------------------------------------------



lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java
<https://reviews.apache.org/r/30251/#comment115429>

    Why do we need to make a `longValue()` call here?


- Rajat Khandelwal


On Jan. 30, 2015, 2:29 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 2:29 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 f75ea60 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
>   lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
>   lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
>   lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 
> 
> Diff: https://reviews.apache.org/r/30251/diff/
> 
> 
> Testing
> -------
> 
> Added a checks in the existing unit tests
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.

> On Jan. 31, 2015, 9:20 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java, line 63
> > <https://reviews.apache.org/r/30251/diff/2/?file=841177#file841177line63>
> >
> >     Why do we need numOfDistinctValues.longValue() here?

MetastoreConstants.DEFAULT_NUM_OF_DISTINCT_VALUES value type is **long** and numOfDistinctValues is **Long** object type. I am just trying to compare the primitive type values.


- Raju


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


On Jan. 30, 2015, 2:52 p.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 2:52 p.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 f75ea60 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
>   lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
>   lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
>   lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 
> 
> Diff: https://reviews.apache.org/r/30251/diff/
> 
> 
> Testing
> -------
> 
> Added a checks in the existing unit tests
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Amareshwari Sriramadasu <am...@apache.org>.

> On Jan. 31, 2015, 9:20 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java, line 63
> > <https://reviews.apache.org/r/30251/diff/2/?file=841177#file841177line63>
> >
> >     Why do we need numOfDistinctValues.longValue() here?
> 
> Raju Bairishetti wrote:
>     MetastoreConstants.DEFAULT_NUM_OF_DISTINCT_VALUES value type is **long** and numOfDistinctValues is **Long** object type. I am just trying to compare the primitive type values.

I see the type in MetastoreConstants as Long itself.
  
  public static final Long DEFAULT_NUM_OF_DISTINCT_VALUES = -1L;


- Amareshwari


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


On Jan. 30, 2015, 2:52 p.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 2:52 p.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 f75ea60 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
>   lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
>   lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
>   lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 
> 
> Diff: https://reviews.apache.org/r/30251/diff/
> 
> 
> Testing
> -------
> 
> Added a checks in the existing unit tests
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.

> On Jan. 31, 2015, 9:20 a.m., Amareshwari Sriramadasu wrote:
> > lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java, line 183
> > <https://reviews.apache.org/r/30251/diff/2/?file=841183#file841183line183>
> >
> >     Cannot pass true for isJoinKey. IsJoinKey was missed in xsd, can you add and pass it from xd here?

isJoinKey is missed in cube xsd. Will add it now.


- Raju


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


On Jan. 30, 2015, 2:52 p.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 2:52 p.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 f75ea60 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
>   lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
>   lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
>   lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 
> 
> Diff: https://reviews.apache.org/r/30251/diff/
> 
> 
> Testing
> -------
> 
> Added a checks in the existing unit tests
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review70500
-----------------------------------------------------------



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

    Why do we need numOfDistinctValues.longValue() here?



lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java
<https://reviews.apache.org/r/30251/#comment115716>

    Cannot pass true for isJoinKey. IsJoinKey was missed in xsd, can you add and pass it from xd here?


- Amareshwari Sriramadasu


On Jan. 30, 2015, 2:52 p.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 2:52 p.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 f75ea60 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
>   lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
>   lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
>   lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 
> 
> Diff: https://reviews.apache.org/r/30251/diff/
> 
> 
> Testing
> -------
> 
> Added a checks in the existing unit tests
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Rajat Khandelwal <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review70544
-----------------------------------------------------------


You don't need to convert between `Long` and `long`. Java takes care of that itself by Autoboxing and Unboxing. http://docs.oracle.com/javase/tutorial/java/data/autoboxing.html

- Rajat Khandelwal


On Jan. 30, 2015, 2:52 p.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 2:52 p.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 f75ea60 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
>   lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
>   lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
>   lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 
> 
> Diff: https://reviews.apache.org/r/30251/diff/
> 
> 
> Testing
> -------
> 
> Added a checks in the existing unit tests
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review79300
-----------------------------------------------------------



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

    Can this call new constrctor with null passed for new param?



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

    Can this call the new constructor with null passed for numOfDistinctValues?



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

    Same as above



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

    Same as above


- Amareshwari Sriramadasu


On April 8, 2015, 3:02 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated April 8, 2015, 3:02 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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Himanshu Gahlaut <ga...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review79490
-----------------------------------------------------------



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

    Instead of assert, please consider using checkArgument() of Preconditions class in guava. That is more readable for Preconditions checks. 
    
    Also consider doing a static import of checkArguments while using it.


- Himanshu Gahlaut


On April 9, 2015, 1:07 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated April 9, 2015, 1:07 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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review79629
-----------------------------------------------------------

Ship it!


Ship It!

- Amareshwari Sriramadasu


On April 10, 2015, 2:09 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated April 10, 2015, 2:09 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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/
-----------------------------------------------------------

(Updated April 10, 2015, 2:09 a.m.)


Review request for lens, Amareshwari Sriramadasu and Jaideep dhok.


Changes
-------

Using guava Preconditions


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 (updated)
-----

  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


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/
-----------------------------------------------------------

(Updated April 9, 2015, 1:07 a.m.)


Review request for lens, Amareshwari Sriramadasu and Jaideep dhok.


Changes
-------

Remove the duplication and catching numberformatexception while parsing numDistinct value


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 (updated)
-----

  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


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Rajat Khandelwal <ra...@gmail.com>.

> On April 8, 2015, 11:40 a.m., Rajat Khandelwal wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java, line 50
> > <https://reviews.apache.org/r/30251/diff/5/?file=920423#file920423line50>
> >
> >     Again, Don't need the `if` and the local variable
> 
> Raju Bairishetti wrote:
>     This check is required as we are checking whther the value is >0 or not. Otherwise we need to add **(mOfDistnctValues.isPresent() && nummOfDistnctValues.get() > 0)**  in assert/checkArgument.

This check is only required as long as we are allowing two ways to create metadata instances: one via `LensClient` and another via `CubeMetastoreClient`. If we have single entry point then such checks can be removed.


- Rajat


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


On April 9, 2015, 6:37 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated April 9, 2015, 6:37 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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.

> On April 8, 2015, 6:10 a.m., Rajat Khandelwal wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java, line 50
> > <https://reviews.apache.org/r/30251/diff/5/?file=920423#file920423line50>
> >
> >     Again, Don't need the `if` and the local variable

This check is required as we are checking whther the value is >0 or not. Otherwise we need to add **(mOfDistnctValues.isPresent() && nummOfDistnctValues.get() > 0)**  in assert/checkArgument.


> On April 8, 2015, 6:10 a.m., Rajat Khandelwal wrote:
> > lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java, line 627
> > <https://reviews.apache.org/r/30251/diff/5/?file=920430#file920430line627>
> >
> >     Do we really need `.longValue()` and `(long)` ?

assertEquals accepts only (long, long) or (Long, Long). Changed the type of value to Long(i.e. Long.ValueOf(value)) instead of converting both args into long type


- Raju


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


On April 9, 2015, 1:07 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated April 9, 2015, 1:07 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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Rajat Khandelwal <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review79306
-----------------------------------------------------------



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

    Again, Don't need the `if` and the local variable



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

    Don't need this check and the loal variable.



lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java
<https://reviews.apache.org/r/30251/#comment128566>

    Changes in this file need to be tested.



lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java
<https://reviews.apache.org/r/30251/#comment128567>

    Do we really need `.longValue()` and `(long)` ?



lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java
<https://reviews.apache.org/r/30251/#comment128568>

    Also add assert for the case where num distinct hasn't been set in xdim


- Rajat Khandelwal


On April 8, 2015, 8:32 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated April 8, 2015, 8:32 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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/
-----------------------------------------------------------

(Updated April 8, 2015, 3:02 a.m.)


Review request for lens, Amareshwari Sriramadasu and Jaideep dhok.


Changes
-------

Using Guava optional for distnictvalue filed


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 (updated)
-----

  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


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Rajat Khandelwal <ra...@gmail.com>.

> On April 4, 2015, 12:39 p.m., Himanshu Gahlaut wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java, line 113
> > <https://reviews.apache.org/r/30251/diff/4/?file=911870#file911870line113>
> >
> >     Can @ToString(callSuper=true) of lombok  work in place of this ?

+1


> On April 4, 2015, 12:39 p.m., Himanshu Gahlaut wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java, line 83
> > <https://reviews.apache.org/r/30251/diff/4/?file=911870#file911870line83>
> >
> >     Parsing exception not handled here.

Yes. Let's set it to absent in such cases, since it's optional anyway. And add a warn log.


- Rajat


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


On April 8, 2015, 8:32 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated April 8, 2015, 8:32 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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Himanshu Gahlaut <ga...@gmail.com>.
-----------------------------------------------------------
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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.

> On April 1, 2015, 11:51 a.m., Amareshwari Sriramadasu wrote:
> > lens-api/src/main/resources/cube-0.1.xsd, line 360
> > <https://reviews.apache.org/r/30251/diff/4/?file=911869#file911869line360>
> >
> >     I think we are returning value as -1 when this is not defined. We should document what does -1 mean. Or should not set anyhting when value is -1, since the attribute is optional anyways.

We are not setting in dim proprties if the value is not defined or defined as -1


- Raju


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


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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.

> On April 1, 2015, 11:51 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java, line 109
> > <https://reviews.apache.org/r/30251/diff/4/?file=911872#file911872line109>
> >
> >     Is default value as -1 required?

Removed the default value after making distinctValue filed as an optional


- Raju


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


On April 8, 2015, 3:02 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated April 8, 2015, 3:02 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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review78513
-----------------------------------------------------------



lens-api/src/main/resources/cube-0.1.xsd
<https://reviews.apache.org/r/30251/#comment127334>

    I think we are returning value as -1 when this is not defined. We should document what does -1 mean. Or should not set anyhting when value is -1, since the attribute is optional anyways.



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

    Is default value as -1 required?


- Amareshwari Sriramadasu


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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.
-----------------------------------------------------------
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.


Changes
-------

Address review comments and rebase master branch


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 (updated)
-----

  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


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.

> On Feb. 2, 2015, 8:17 a.m., Amareshwari Sriramadasu wrote:
> > lens-api/src/main/resources/cube-0.1.xsd, line 197
> > <https://reviews.apache.org/r/30251/diff/3/?file=843302#file843302line197>
> >
> >     call it join_key.
> >     
> >     Also I'm thinking it should be added as an attribute in x_table_references directly.
> >     
> >     Can you add documentation as well?

Rename isJoinKey to join_key  and added documentaion but not added to x_table_references


- Raju


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


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
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/#review70550
-----------------------------------------------------------



lens-api/src/main/resources/cube-0.1.xsd
<https://reviews.apache.org/r/30251/#comment115771>

    name should be num_distinct_values



lens-api/src/main/resources/cube-0.1.xsd
<https://reviews.apache.org/r/30251/#comment115772>

    Change text to 'Specifies an indicative value of how many distinct values the dim attribute can take.'



lens-api/src/main/resources/cube-0.1.xsd
<https://reviews.apache.org/r/30251/#comment115773>

    call it join_key.
    
    Also I'm thinking it should be added as an attribute in x_table_references directly.
    
    Can you add documentation as well?


- Amareshwari Sriramadasu


On Feb. 2, 2015, 8:03 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30251/
> -----------------------------------------------------------
> 
> (Updated Feb. 2, 2015, 8:03 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 f75ea60 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
>   lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
>   lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
>   lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 
> 
> Diff: https://reviews.apache.org/r/30251/diff/
> 
> 
> Testing
> -------
> 
> Added a checks in the existing unit tests
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/
-----------------------------------------------------------

(Updated Feb. 2, 2015, 8:03 a.m.)


Review request for lens, Amareshwari Sriramadasu and Jaideep dhok.


Changes
-------

add isJoinKey in cube xsd


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 (updated)
-----

  lens-api/src/main/resources/cube-0.1.xsd f75ea60 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
  lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
  lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
  lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 

Diff: https://reviews.apache.org/r/30251/diff/


Testing
-------

Added a checks in the existing unit tests


Thanks,

Raju Bairishetti


Re: Review Request 30251: LENS-68: Add number of possible distinct values for dim-attributes

Posted by Raju Bairishetti <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30251/
-----------------------------------------------------------

(Updated Jan. 30, 2015, 2:52 p.m.)


Review request for lens, Amareshwari Sriramadasu and Jaideep dhok.


Summary (updated)
-----------------

LENS-68: Add number of possible distinct values for dim-attributes 


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 f75ea60 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/BaseDimAttribute.java 2c0e70d 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/InlineDimAttribute.java 140f284 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreConstants.java 6b81cae 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java 4f283ad 
  lens-cube/src/main/java/org/apache/lens/cube/metadata/ReferencedDimAtrribute.java ab06db9 
  lens-cube/src/test/java/org/apache/lens/cube/metadata/TestCubeMetastoreClient.java f9e9f3d 
  lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java 2a9566f 
  lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java 8bf9f81 

Diff: https://reviews.apache.org/r/30251/diff/


Testing
-------

Added a checks in the existing unit tests


Thanks,

Raju Bairishetti