----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50813/#review144874 -----------------------------------------------------------
Ship it! Ship It! - Amareshwari Sriramadasu On Aug. 4, 2016, 5:19 p.m., Sushil Mohanty wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/50813/ > ----------------------------------------------------------- > > (Updated Aug. 4, 2016, 5:19 p.m.) > > > Review request for lens. > > > Bugs: LENS-1264 > https://issues.apache.org/jira/browse/LENS-1264 > > > Repository: lens > > > Description > ------- > > expression : > <expression name="distinct_users" _type="BIGINT" display_string="Distinct > Users"> > <expr_spec expr="count(distinct(user))"/> > </expression> > > cube query : > query execute cube select country,distinct_users from testcube where > time_range_in(time_col,'2016-07-31-00','2016-07-31-01') > > rewritten query : > SELECT distinct (testcube.country), count(distinct (testcube.user)) FROM > db.fact_table testcube WHERE (((testcube.dt) in ('2016-07-31-00'))) > > Column testcube.country should be part of group by as there is already > aggregate column used in select. Rewritten query is wrong with distinct > keyword. > > > Diffs > ----- > > lens-cube/src/main/java/org/apache/lens/cube/parse/AggregateResolver.java > ef2ca4e > lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java > 48652f2 > lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java > 4dfd754 > > Diff: https://reviews.apache.org/r/50813/diff/ > > > Testing > ------- > > lens-cube unit tests are running fine. > > -------------------------------------------------------- > T E S T S > ------------------------------------------------------- > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; > support was removed in 8.0 > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; > support was removed in 8.0 > Running TestSuite > Tests run: 403, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1,074.248 > sec - in TestSuite > > Results : > > Tests run: 403, Failures: 0, Errors: 0, Skipped: 0 > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Sushil Mohanty > >
