----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46890/#review132012 -----------------------------------------------------------
lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryContext.java (lines 1007 - 1016) <https://reviews.apache.org/r/46890/#comment196052> Code in both if and else look the same, except where clause construction. We can pass the if condition checks to where clause construction and construct accordingly and avoid if and else. lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryContext.java (lines 1026 - 1033) <https://reviews.apache.org/r/46890/#comment196053> Instead of filterNodeToTypeMap and reconstruction of filters this way - use ArrayList of filter strings and simply populate string for each filter node. - Amareshwari Sriramadasu On May 3, 2016, 5:10 a.m., Sushil Mohanty wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46890/ > ----------------------------------------------------------- > > (Updated May 3, 2016, 5:10 a.m.) > > > Review request for lens. > > > Bugs: LENS-1028 > https://issues.apache.org/jira/browse/LENS-1028 > > > Repository: lens > > > Description > ------- > > Changes include dim filters to rewrite as fact filers for star joins. > e.g. > where dim.name in ('x', 'y') > becomes > where fact.dimid in (select dim.id from dim where dim.name in ('x','y')) > > > Diffs > ----- > > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java > 3f724b6 > lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java > a57292c > lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryContext.java > c9b1475 > lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultQueryAST.java > 0697e78 > lens-cube/src/main/java/org/apache/lens/cube/parse/DimHQLContext.java > 7c14be7 > lens-cube/src/main/java/org/apache/lens/cube/parse/MultiFactHQLContext.java > 4d6ce9e > lens-cube/src/main/java/org/apache/lens/cube/parse/QueryAST.java f064dcb > > lens-cube/src/main/java/org/apache/lens/cube/parse/join/AutoJoinContext.java > 8b24f70 > lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java > a223449 > src/site/apt/user/olap-query-conf.apt 6372fb1 > > Diff: https://reviews.apache.org/r/46890/diff/ > > > Testing > ------- > > Added unit tests. mvn clean install works fine. > > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] Lens Checkstyle Rules ............................. SUCCESS [1.657s] > [INFO] Lens .............................................. SUCCESS [3.469s] > [INFO] Lens API .......................................... SUCCESS [20.412s] > [INFO] Lens API for server and extensions ................ SUCCESS [16.309s] > [INFO] Lens Cube ......................................... SUCCESS [7:01.036s] > [INFO] Lens DB storage ................................... SUCCESS [16.546s] > [INFO] Lens Query Library ................................ SUCCESS [14.961s] > [INFO] Lens Hive Driver .................................. SUCCESS [2:24.649s] > [INFO] Lens Driver for JDBC .............................. SUCCESS [29.037s] > [INFO] Lens Elastic Search Driver ........................ SUCCESS [13.653s] > [INFO] Lens Server ....................................... SUCCESS > [16:37.087s] > [INFO] Lens client ....................................... SUCCESS [1:39.534s] > [INFO] Lens CLI .......................................... SUCCESS [2:28.860s] > [INFO] Lens Examples ..................................... SUCCESS [8.573s] > [INFO] Lens Ship Jars to Distributed Cache ............... SUCCESS [0.867s] > [INFO] Lens Distribution ................................. SUCCESS [9.838s] > [INFO] Lens ML Lib ....................................... SUCCESS [1:09.035s] > [INFO] Lens ML Ext Distribution .......................... SUCCESS [1.741s] > [INFO] Lens Regression ................................... SUCCESS [9.944s] > [INFO] Lens UI ........................................... SUCCESS [43.727s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 34:31.633s > [INFO] Finished at: Mon May 02 10:19:12 UTC 2016 > [INFO] Final Memory: 183M/2727M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Sushil Mohanty > >
