> On March 31, 2017, 4:39 p.m., Amareshwari Sriramadasu wrote: > > lens-cube/src/main/java/org/apache/lens/cube/metadata/FactPartition.java > > Line 67 (original), 67 (patched) > > <https://reviews.apache.org/r/58102/diff/1/?file=1681877#file1681877line67> > > > > Why is this required? Can you add comment in code saying why we are > > creating FactPartition without containing? > > Puneet Gupta wrote: > Earlier this code was in AbridgedTimeRangeWriter. It was moved to > FactPartition
This is to do optimizations in time range writer. `FP(it=a, inner=FP(et=x)) + FP(it=b, inner=FP(et=x))` can be naively written as `((it = a and et = x) OR (it=b and et=x)`. The optimization is to write it as `(it=a or it=b) and (et=x)`. For implementing this, we need to extract out common inner partitions, and hence the need for a method like `withoutContaining`. The method was earliner in the time range write class. The only change is movement and explicit documentation in terms of method name. - Rajat ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58102/#review170696 ----------------------------------------------------------- On April 5, 2017, 11:08 a.m., Sushil Mohanty wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58102/ > ----------------------------------------------------------- > > (Updated April 5, 2017, 11:08 a.m.) > > > Review request for lens. > > > Bugs: LENS-1381 > https://issues.apache.org/jira/browse/LENS-1381 > > > Repository: lens > > > Description > ------- > > This is a neew feature to support union across multiple facts. > > > Diffs > ----- > > lens-api/src/main/java/org/apache/lens/api/ToXMLString.java e74adc9 > lens-api/src/main/java/org/apache/lens/api/jaxb/LensJAXBContext.java > 14fc4aa > lens-api/src/main/java/org/apache/lens/api/metastore/SchemaTraverser.java > PRE-CREATION > lens-api/src/main/resources/cube-0.1.xsd 060eb43 > lens-cli/src/main/java/org/apache/lens/cli/commands/LensSchemaCommands.java > feabf9c > > lens-cube/src/main/java/org/apache/lens/cube/error/NoCandidateFactAvailableException.java > b2568ff > lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeFactTable.java > 896a7a1 > > lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java > 087c203 > lens-cube/src/main/java/org/apache/lens/cube/metadata/DateUtil.java 7717081 > lens-cube/src/main/java/org/apache/lens/cube/metadata/FactPartition.java > 1694b80 > lens-cube/src/main/java/org/apache/lens/cube/metadata/JAXBUtils.java > PRE-CREATION > lens-cube/src/main/java/org/apache/lens/cube/metadata/TimeRange.java > bf6cc5c > > lens-cube/src/main/java/org/apache/lens/cube/parse/AbridgedTimeRangeWriter.java > 8681e90 > lens-cube/src/main/java/org/apache/lens/cube/parse/AggregateResolver.java > 9658100 > > lens-cube/src/main/java/org/apache/lens/cube/parse/BetweenTimeRangeWriter.java > c8b8129 > lens-cube/src/main/java/org/apache/lens/cube/parse/Candidate.java > PRE-CREATION > > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateCoveringSetsResolver.java > PRE-CREATION > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateDim.java > 4dcdbcf > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateFact.java > b42262d > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTable.java > e001ca4 > > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTablePruneCause.java > bd6e27c > > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateTableResolver.java > e9270ea > lens-cube/src/main/java/org/apache/lens/cube/parse/CandidateUtil.java > PRE-CREATION > lens-cube/src/main/java/org/apache/lens/cube/parse/CheckTableNames.java > 8586262 > > lens-cube/src/main/java/org/apache/lens/cube/parse/ColumnLifetimeChecker.java > PRE-CREATION > lens-cube/src/main/java/org/apache/lens/cube/parse/ColumnResolver.java > 87e094a > lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryContext.java > 125b432 > lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryRewriter.java > b612173 > > lens-cube/src/main/java/org/apache/lens/cube/parse/CubeSemanticAnalyzer.java > fc96055 > lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultAliasDecider.java > 80ceae4 > lens-cube/src/main/java/org/apache/lens/cube/parse/DefaultQueryAST.java > c9993f3 > > lens-cube/src/main/java/org/apache/lens/cube/parse/DenormalizationResolver.java > cb26878 > lens-cube/src/main/java/org/apache/lens/cube/parse/ExpressionResolver.java > 0ea0b1c > lens-cube/src/main/java/org/apache/lens/cube/parse/FieldValidator.java > 48af0c9 > lens-cube/src/main/java/org/apache/lens/cube/parse/GroupbyResolver.java > 216ae52 > lens-cube/src/main/java/org/apache/lens/cube/parse/JoinCandidate.java > PRE-CREATION > lens-cube/src/main/java/org/apache/lens/cube/parse/JoinResolver.java > 7b865bf > > lens-cube/src/main/java/org/apache/lens/cube/parse/LeastPartitionResolver.java > a53e994 > > lens-cube/src/main/java/org/apache/lens/cube/parse/LightestFactResolver.java > 97accbb > > lens-cube/src/main/java/org/apache/lens/cube/parse/MaxCoveringFactResolver.java > 45824fe > lens-cube/src/main/java/org/apache/lens/cube/parse/MultiFactHQLContext.java > 979c24b > lens-cube/src/main/java/org/apache/lens/cube/parse/PruneCauses.java 9b5a52f > > lens-cube/src/main/java/org/apache/lens/cube/parse/QueriedPhraseContext.java > 34a562d > lens-cube/src/main/java/org/apache/lens/cube/parse/QueryAST.java 7298604 > lens-cube/src/main/java/org/apache/lens/cube/parse/SimpleHQLContext.java > 62ceb12 > > lens-cube/src/main/java/org/apache/lens/cube/parse/SingleFactMultiStorageHQLContext.java > 9b48213 > > lens-cube/src/main/java/org/apache/lens/cube/parse/SingleFactSingleStorageHQLContext.java > dbc84ed > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageCandidate.java > PRE-CREATION > > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageTableResolver.java > cdf6812 > lens-cube/src/main/java/org/apache/lens/cube/parse/StorageUtil.java f9636d1 > lens-cube/src/main/java/org/apache/lens/cube/parse/TimeRangeChecker.java > f18ae36 > lens-cube/src/main/java/org/apache/lens/cube/parse/UnionCandidate.java > PRE-CREATION > lens-cube/src/main/java/org/apache/lens/cube/parse/UnionHQLContext.java > e6ee989 > lens-cube/src/main/java/org/apache/lens/cube/parse/UnionQueryWriter.java > PRE-CREATION > > lens-cube/src/main/java/org/apache/lens/cube/parse/join/AutoJoinContext.java > 3d5c5ac > > lens-cube/src/main/java/org/apache/lens/cube/parse/join/BridgeTableJoinContext.java > cf74634 > lens-cube/src/main/java/org/apache/lens/driver/cube/RewriterPlan.java > fd6c30d > lens-cube/src/test/java/org/apache/lens/cube/metadata/DateFactory.java > 3bdc047 > lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java > 9b29083 > > lens-cube/src/test/java/org/apache/lens/cube/parse/FieldsCannotBeQueriedTogetherTest.java > 1a5bd0d > > lens-cube/src/test/java/org/apache/lens/cube/parse/TestAggregateResolver.java > dd0b6dc > lens-cube/src/test/java/org/apache/lens/cube/parse/TestBaseCubeQueries.java > dbb8fa3 > > lens-cube/src/test/java/org/apache/lens/cube/parse/TestBetweenTimeRangeWriter.java > 450605b > > lens-cube/src/test/java/org/apache/lens/cube/parse/TestBridgeTableQueries.java > 2f00244 > lens-cube/src/test/java/org/apache/lens/cube/parse/TestCubeRewriter.java > 98b021b > > lens-cube/src/test/java/org/apache/lens/cube/parse/TestDenormalizationResolver.java > 5505ed4 > > lens-cube/src/test/java/org/apache/lens/cube/parse/TestExpressionResolver.java > 5d4e87f > lens-cube/src/test/java/org/apache/lens/cube/parse/TestJoinResolver.java > 677d641 > lens-cube/src/test/java/org/apache/lens/cube/parse/TestQueryMetrics.java > 27a18f4 > lens-cube/src/test/java/org/apache/lens/cube/parse/TestRewriterPlan.java > 7f26b24 > > lens-cube/src/test/java/org/apache/lens/cube/parse/TestTimeRangeResolver.java > 280a8c4 > > lens-cube/src/test/java/org/apache/lens/cube/parse/TestTimeRangeWriterWithQuery.java > 7010849 > > lens-cube/src/test/java/org/apache/lens/cube/parse/TestUnionAndJoinCandidates.java > PRE-CREATION > lens-cube/src/test/java/org/apache/lens/cube/parse/TestUnionQueries.java > d5bc81c > lens-cube/src/test/resources/schema/cubes/base/basecube.xml PRE-CREATION > lens-cube/src/test/resources/schema/cubes/base/testcube.xml PRE-CREATION > lens-cube/src/test/resources/schema/cubes/derived/der1.xml PRE-CREATION > lens-cube/src/test/resources/schema/cubes/derived/der2.xml PRE-CREATION > lens-cube/src/test/resources/schema/cubes/derived/der3.xml PRE-CREATION > lens-cube/src/test/resources/schema/cubes/derived/derivedcube.xml > PRE-CREATION > lens-cube/src/test/resources/schema/cubes/derived/union_join_ctx_der1.xml > PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/citydim.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/countrydim.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/cycledim1.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/cycledim2.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/daydim.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/hourdim.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/sports.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/statedim.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/testdim2.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/testdim3.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/testdim4.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/unreachabledim.xml > PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/user_interests.xml > PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/userdim.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimensions/zipdim.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/citytable.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/citytable2.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/citytable3.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/citytable4.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/countrytable.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/countrytable_partitioned.xml > PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/cycledim1tbl.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/cycledim2tbl.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/daydimtbl.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/hourdimtbl.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/sports_tbl.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/statetable.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/statetable_partitioned.xml > PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/testdim2tbl.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/testdim2tbl2.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/testdim2tbl3.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/testdim3tbl.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/testdim4tbl.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/unreachabledimtable.xml > PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/user_interests_tbl.xml > PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/usertable.xml PRE-CREATION > lens-cube/src/test/resources/schema/dimtables/ziptable.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/cheapfact.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/summary1.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/summary2.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/summary3.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/summary4.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact1_base.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact1_raw_base.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact2.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact2_base.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact2_raw.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact2_raw_base.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact3_base.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact3_raw_base.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact4_raw_base.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact5_base.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact5_raw_base.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact6_base.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact_continuous.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfact_deprecated.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/testfactmonthly.xml PRE-CREATION > lens-cube/src/test/resources/schema/facts/union_join_ctx_fact1.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/union_join_ctx_fact2.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/union_join_ctx_fact3.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/union_join_ctx_fact5.xml > PRE-CREATION > lens-cube/src/test/resources/schema/facts/union_join_ctx_fact6.xml > PRE-CREATION > lens-cube/src/test/resources/schema/segmentations/seg1.xml PRE-CREATION > lens-cube/src/test/resources/schema/storages/c0.xml PRE-CREATION > lens-cube/src/test/resources/schema/storages/c1.xml PRE-CREATION > lens-cube/src/test/resources/schema/storages/c2.xml PRE-CREATION > lens-cube/src/test/resources/schema/storages/c3.xml PRE-CREATION > lens-cube/src/test/resources/schema/storages/c4.xml PRE-CREATION > lens-cube/src/test/resources/schema/storages/c5.xml PRE-CREATION > lens-cube/src/test/resources/schema/storages/c99.xml PRE-CREATION > > lens-driver-jdbc/src/main/java/org/apache/lens/driver/jdbc/ColumnarSQLRewriter.java > 75153f6 > > lens-driver-jdbc/src/main/java/org/apache/lens/driver/jdbc/DruidSQLRewriter.java > 2351fb3 > > lens-server/src/main/java/org/apache/lens/server/metastore/CubeMetastoreServiceImpl.java > 24660e1 > lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java > 7d54c7b > > lens-server/src/main/java/org/apache/lens/server/metastore/MetastoreResource.java > 9d823da > > lens-server/src/test/java/org/apache/lens/server/common/RestAPITestUtil.java > 02e2f8b > lens-server/src/test/java/org/apache/lens/server/common/TestDataUtils.java > 0400519 > > lens-server/src/test/java/org/apache/lens/server/query/QueryAPIErrorResponseTest.java > 567c929 > > > Diff: https://reviews.apache.org/r/58102/diff/2/ > > > Testing > ------- > > > Thanks, > > Sushil Mohanty > >