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/04/01 03:13:55 UTC

Re: Review Request 30251: LENS-68: 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 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 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
> 
>