> On Sept. 15, 2015, 2 p.m., Rajat Khandelwal wrote: > > lens-cube/src/main/java/org/apache/lens/cube/parse/JoinResolver.java, lines > > 586-587 > > <https://reviews.apache.org/r/38402/diff/1/?file=1073797#file1073797line586> > > > > only null check needed. > > Amareshwari Sriramadasu wrote: > why? we should check if the column are queried from that table as well. > > Rajat Khandelwal wrote: > the empty case will be taken care while iterating over collection of zero > elements.
The check is not just for iteration, it is doing more along with iteration. > On Sept. 15, 2015, 2 p.m., Rajat Khandelwal wrote: > > lens-cube/src/main/java/org/apache/lens/cube/parse/JoinResolver.java, line > > 585 > > <https://reviews.apache.org/r/38402/diff/1/?file=1073797#file1073797line585> > > > > Among the approaches: > > > > 1. Relying on a flag to append "select" or "join" > > 2. Making a list and later doing "select" + StringUtils.join("join", > > list) > > > > the second seems more intuitive. And would be easier to debug later on. > > Amareshwari Sriramadasu wrote: > Did not understand the comment fully. > > It is not simply prepending select or join to alist. If join needs to be > converted to select from a bridge table - it becomes a full fledged query > with select, from, groupby, filters and optionally more joins. > > Rajat Khandelwal wrote: > Yes. I hadn't understood the code fully. Can you please add docs > explaining the steps. Sure. Will update with comments. - Amareshwari ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38402/#review99024 ----------------------------------------------------------- On Sept. 15, 2015, 12:48 p.m., Amareshwari Sriramadasu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/38402/ > ----------------------------------------------------------- > > (Updated Sept. 15, 2015, 12:48 p.m.) > > > Review request for lens. > > > Repository: lens > > > Description > ------- > > Changes include : > - Ability to specify if the destination link in a join chain has > many-many-relationship > - Ability to configure at query to say flatten the fields coming from > bridge-table relations > - Enhance cube query rewriter (mainly the join clause) to add join for bridge > table to flatten them > > Pending : > - Add a test with multi fact query > - Update documentation with feature addition > > > Diffs > ----- > > lens-api/src/main/resources/cube-0.1.xsd 58f68f5 > lens-cube/src/main/java/org/apache/lens/cube/metadata/JoinChain.java > e394e20 > lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java > bf27b99 > lens-cube/src/main/java/org/apache/lens/cube/metadata/SchemaGraph.java > 1a37e80 > lens-cube/src/main/java/org/apache/lens/cube/metadata/TableReference.java > 31fd97b > lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java > aab2488 > lens-cube/src/main/java/org/apache/lens/cube/parse/JoinResolver.java > c7f1e2a > lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java > 7f56292 > lens-cube/src/test/java/org/apache/lens/cube/parse/TestJoinResolver.java > cb63fad > lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java > ed472f6 > > lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java > f9be6e6 > > Diff: https://reviews.apache.org/r/38402/diff/ > > > Testing > ------- > > Added testcases for bridge tables and queries on them. > > All tests in lens-cube module pass. Will update full test results once done. > > > Thanks, > > Amareshwari Sriramadasu > >