> On March 27, 2017, 2:03 p.m., Rajat Khandelwal wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/DenormalizationResolver.java
> > Line 279 (original), 280 (patched)
> > <https://reviews.apache.org/r/57949/diff/1/?file=1676420#file1676420line280>
> >
> >     The existence of cubeql seems intentional. Can you explain why the 
> > change?

org.apache.lens.cube.parse.CandidateUtil#copyASTs is not copying getOrderByAST 
also.  So cubeql queryASt and stoarge candidate queryAST will have different 
OrderByAST object instances now.


> On March 27, 2017, 2:03 p.m., Rajat Khandelwal wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageCandidate.java
> > Lines 937 (patched)
> > <https://reviews.apache.org/r/57949/diff/1/?file=1676425#file1676425line993>
> >
> >     shouldn't we do max here instead of override?

This is being used in private context. 

I will add the below an explantion in code for reference.  

*CASE 1*
*If has Storage has single storage table* 
Storage start time = max(storage start time , fact start time)
Storage end time = min(storage end time , fact start time)

*CASE 2*
*If the Storage has multiple Storage Tables (one per update period)*
update Period start Time = Max(update start time, fact start time)
update Period end Time = Min(update end time, fact end time)
Stoarge start and end time is derived form the underlying update period start 
and end times.
Storage start time = min(update1 start time ,...., updateN start time)
Storage end time = max(update1 end time ,...., updateN end time)

*Note in Case 2 its assumed that the time range supported by different update 
periods are either overalpping(Example1) or form a continous chain(Eaxmple2) as 
illustrated in examples below

Example 1
A Storage has 2 Non Oevralpping but continuous Update Periods. 
MONTHLY with start time as now.month -13 months and end time as now.month 
-2months  and 
DAILY with start time as now.day and end time as now.month -2months
Then this Sorage will have an implied start time as now.month -13 month and end 
time as now.day

Example 2
A Storage has 2 Overlapping Update Periods.
MONTHLY with start time as now.month -13 months and end time as now.month 
-1months  and 
DAILY with start time as now.day and end time as now.month -2months
Then this Sorage will have an implied start time as now.month -13 month and end 
time as now.day


- Puneet


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


On March 27, 2017, 11:19 a.m., Puneet Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57949/
> -----------------------------------------------------------
> 
> (Updated March 27, 2017, 11:19 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1397
>     https://issues.apache.org/jira/browse/LENS-1397
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> Consider the case where a Storage S has three update periods and each update 
> period has a different table description "table_desc" as supported in 
> LENS-1386. 
> 
> We should be able to rewrite queries for such storages
> 
> 
> Diffs
> -----
> 
>   
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
>  c8a2498ba25ee6c968fd8ca4169612cc3a2763fe 
>   lens-cube/src/main/java/org/apache/lens/cube/metadata/TimeRange.java 
> 5bdbf74c4171badbefe5bc07e9ae557b100b0abb 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/Candidate.java 
> 095a2976db5c1d456b7ab3b4ca95b6cac9172172 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateCoveringSetsResolver.java
>  0b7d4002bb9390b364e1b4aeb78ae9f0eb523d25 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java
>  6cb18e629011de17d8c12a0bac0fc6e9110c7186 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTableResolver.java
>  97a73a8059d816eb2f35b313f74c7a04aa60e49c 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateUtil.java 
> 68449f667782c15802ed211b51a91f208471f058 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/ColumnLifetimeChecker.java 
> 24eb8f05d250dfecb41afc4a4eb8f031b90850d8 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryContext.java 
> 76031ecbadec307a12fe172f7b227b9f292e642f 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/CubeSemanticAnalyzer.java 
> 0e2ca821ba8eb7c3b4eeb029ac88422091781a48 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultQueryAST.java 
> 17e202d5eeeaa75bc985372a05a8589ac9271626 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/DenormalizationResolver.java
>  bcea7ed4d39639e66f699500f24b79dc280d3906 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/ExpressionResolver.java 
> 1daeea53955d121abfe94eaae2979bb1cbc8eca5 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/JoinCandidate.java 
> fa3ba8f982b35eb3c79afd76284b698f09558a4e 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java
>  4cae6f8074641574859b8d2782ac3afa11d6e441 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/QueryAST.java 
> bdd6376373b50c3e2c1606e69eeac75d186d6af2 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/StorageCandidate.java 
> e6e9f8f0f42471567611fe0e4629d5f9f87a471a 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java 
> 22e2e09f2ee2c3fd7b970025a8155dda1ff4847d 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/UnionCandidate.java 
> d97e7b8d499393a1cb5122126bd97637c1bd2b58 
>   lens-cube/src/main/java/org/apache/lens/cube/parse/UnionQueryWriter.java 
> 2ca11819166c3b6de10d0ff63eed4eb4c501ff5b 
>   
> lens-cube/src/main/java/org/apache/lens/cube/parse/join/AutoJoinContext.java 
> b5b0b30426bb9d5761108e4d09ace970e8b1b9d5 
>   lens-cube/src/test/java/org/apache/lens/cube/metadata/DateFactory.java 
> 3bdc047c37f3e4425277db579c80ceb1cb89a6b2 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java 
> 2d031f435fbd663f634ec1eeff58e1473e0173c5 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java 
> 2bf0554cd016cb581a1dcfa6220980a03d8777ff 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/TestDenormalizationResolver.java
>  523a8768cc917bab95cf8f2bd9ff57a1a6f6e24c 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryMetrics.java 
> 46ee863e71a3444abbc1365243d6014017e30014 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/TestTimeRangeResolver.java 
> cd7383bca91c072c30a5bc4207369288d7cb0a76 
>   
> lens-cube/src/test/java/org/apache/lens/cube/parse/TestTimeRangeWriterWithQuery.java
>  a6b8f889c26f38c2c94f35e2752b1779b6a1ec4d 
>   lens-cube/src/test/java/org/apache/lens/cube/parse/TestUnionQueries.java 
> c2d5f7c3202d0472ff06c3065f359964c0f1217c 
>   lens-cube/src/test/resources/schema/facts/testfact.xml 
> a4c2c7810cf64a3d275d1bc532696dab69d1c705 
> 
> 
> Diff: https://reviews.apache.org/r/57949/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Puneet Gupta
> 
>

Reply via email to