> On Jan. 11, 2016, 10:01 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java, 
> > lines 191-198
> > <https://reviews.apache.org/r/42070/diff/1/?file=1187458#file1187458line191>
> >
> >     Why is additional loop required?

Fact's select tree has original query's select tree and extra select 
expressisons picked from having expression. The first loop is over select 
expressions 0 to `cubeql.getselecttree.getchildcount`. This loop is over the 
extra columns picked from having.


> On Jan. 11, 2016, 10:01 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryContext.java, 
> > line 893
> > <https://reviews.apache.org/r/42070/diff/1/?file=1187459#file1187459line893>
> >
> >     Why is having clause converted to where?

Because aggregation is already done. Inner having conditions have to be written 
as where conditions in the outer query.


> On Jan. 11, 2016, 10:01 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java,
> >  lines 363-374
> > <https://reviews.apache.org/r/42070/diff/1/?file=1187464#file1187464line363>
> >
> >     Having clauses should be pushed down to corresponding fact queries. 
> > Should not be converted to where clause.

Right now we have correctness issue. Push down of having clause has certain 
requirements:

1. The entire boolean expression of having clause should be a bunch of 
sub-clauses being `AND`ed together.
2. Each of those sub-clauses should be completely evaluable by one of the 
facts. ''

Hence I've implemented a `correct` solution first, will take pushdown as an 
improvement.


- Rajat


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


On Jan. 8, 2016, 6:56 p.m., Rajat Khandelwal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42070/
> -----------------------------------------------------------
> 
> (Updated Jan. 8, 2016, 6:56 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-813
>     https://issues.apache.org/jira/browse/LENS-813
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> 
> Diffs
> -----
> 
>   lens-client/src/main/java/org/apache/lens/client/LensClient.java 
> f7f99c7c20b97e9f2b53c39ee147d5cc682f93dc 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java 
> c305244c98ff38a0acaa24812ccec9d2910e0095 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryContext.java 
> 1fd1d17bbc05b2ca07d88237b4143ea3cd904d0e 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/ExpressionResolver.java 
> 26514d86776ff55f5a674ae51d1066100e797e10 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/HQLParser.java 
> bfb65c7bde8f6d9ec963714cf1cb9e292ed3ae9c 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/MultiFactHQLContext.java 
> 1a729f8eab5cb3f8ab2eeb9bf32dc0c3efc05620 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/SingleFactMultiStorageHQLContext.java
>  ac5632823d8a55f7e25b5058167e40fc7e6aedaf 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> 5b44f9581ab1d57239b86738963ff519c0e94a9a 
> 
> Diff: https://reviews.apache.org/r/42070/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rajat Khandelwal
> 
>

Reply via email to