> On Dec. 27, 2014, 12:09 p.m., Laxman Ch wrote: > > lens-cube/src/main/java/org/apache/lens/cube/parse/GroupbyResolver.java, > > line 163 > > <https://reviews.apache.org/r/29422/diff/4/?file=801693#file801693line163> > > > > Please clarify > > > > - getNonMsrNonAggSelExprsWithoutAlias is a subset of selectExprs. That > > means we are promoting a subset. What happens to the rest? No need to > > promote. > > > > - Does this scenario doesn't occur with group by aliases having space? > > Can we have a testcase for the same. > > Himanshu Gahlaut wrote: > For point 1, the old logic was to not promote the rest, hence have kept > the same. > For your second point, it is a bit unclear to me but it is looking > interesting. could you provide me a input user query and expected HQL query, > so that i can be clear about this thought and also test it ? > > Laxman Ch wrote: > not sure about HQL. we need to seek some hql expert's help here. > but i can provide one in rdbms world > > select count(empno) "head count" from employee group by deptno; > > Himanshu Gahlaut wrote: > select count(empno) "head count" from employee group by deptno; > > This kind of query will not require empno to be promoted to group by > because an aggregate is applied on empno. Any other query ? > > Amareshwari Sriramadasu wrote: > getNonMsrNonAggSelExprsWithoutAlias is a subset of selectExprs. That > means we are promoting a subset. What happens to the rest? No need to promote. > >> Yes > > Does this scenario doesn't occur with group by aliases having space? Can > we have a testcase for the same. > >> There cannot be aliases in group by clause
@Laxman, Has Amareshwari's reply clarified the doubt ? - Himanshu ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29422/#review66178 ----------------------------------------------------------- On Dec. 28, 2014, 5:42 a.m., Himanshu Gahlaut wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29422/ > ----------------------------------------------------------- > > (Updated Dec. 28, 2014, 5:42 a.m.) > > > Review request for lens. > > > Repository: lens > > > Description > ------- > > (1) getExpressionWithoutAlias in GroupbyResolver.class is unable to handle > aliases with spaces in them. Fixed the same. > (2) Also improved log4j.properties of lens-cube to send logs to both console > appender and test log files. > (3) Used Slf4j annotation in Test classes for getting a reference to Slf4j > logger. Added required dependencies in lens-cube/pom.xml to facilitate the > same. > > > Diffs > ----- > > lens-cube/pom.xml 1bcb4dc > lens-cube/src/main/java/org/apache/lens/cube/parse/GroupbyResolver.java > c2fef7e > lens-cube/src/main/java/org/apache/lens/cube/parse/HQLParser.java 8e41830 > lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java > f515df1 > lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java > ad4abcf > lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryRewrite.java > fd939e9 > lens-cube/src/test/resources/log4j.properties 9729de0 > > Diff: https://reviews.apache.org/r/29422/diff/ > > > Testing > ------- > > Added new unit test cases for the changes. > All existing Unit Test Cases passed. > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] Lens Checkstyle Rules ............................. SUCCESS [14.068s] > [INFO] Lens .............................................. SUCCESS [5.717s] > [INFO] Lens API .......................................... SUCCESS [9.369s] > [INFO] Lens API for server and extensions ................ SUCCESS [8.624s] > [INFO] Lens Cube ......................................... SUCCESS [7:10.440s] > [INFO] Lens DB storage ................................... SUCCESS [23.631s] > [INFO] Lens Query Library ................................ SUCCESS [9.386s] > [INFO] Lens Hive Driver .................................. SUCCESS [3:34.922s] > [INFO] Lens Driver for Cloudera Impala ................... SUCCESS [10.798s] > [INFO] Lens Driver for JDBC .............................. SUCCESS [36.429s] > [INFO] Lens Server ....................................... SUCCESS > [14:29.334s] > [INFO] Lens client ....................................... SUCCESS [45.711s] > [INFO] Lens CLI .......................................... SUCCESS [3:10.102s] > [INFO] Lens Examples ..................................... SUCCESS [3.064s] > [INFO] Lens Distribution ................................. SUCCESS [11.315s] > [INFO] Lens Client Distribution .......................... SUCCESS [7.496s] > [INFO] Lens ML Lib ....................................... SUCCESS [2:32.231s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 34:03.600s > [INFO] Finished at: Fri Dec 26 18:21:01 IST 2014 > [INFO] Final Memory: 100M/332M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Himanshu Gahlaut > >
