> On Dec. 3, 2020, 5:58 p.m., Ashutosh Mestry wrote: > > repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java > > Lines 208 (patched) > > <https://reviews.apache.org/r/73058/diff/2/?file=2242677#file2242677line217> > > > > This doesn't make senese.
this has been used in DSLVisitor#241 to modify query accordingly. if it is non primitive (relationship or glossary), add attribute inside and() condition, to avoid traversing back to the original vertex. Example: hive_table where db.name = "sales"; original query: g.V().has("__typeName", 'hive_Table').out('__hive_table.db').has('Asset.__s_name', eq('product_id')).dedup().in('__Table.db').dedup().limit(25).toList() Current query: g.V().has('__typeName', 'hive_table').and(__.out('__hive_table.db').has('Asset.__s_name', eq('product_id')).dedup()).dedup().limit(25).toList() > On Dec. 3, 2020, 5:58 p.m., Ashutosh Mestry wrote: > > repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java > > Line 102 (original), 102 (patched) > > <https://reviews.apache.org/r/73058/diff/2/?file=2242687#file2242687line102> > > > > Can you please include a test that verifies the genreated gremlin query? yes sure > On Dec. 3, 2020, 5:58 p.m., Ashutosh Mestry wrote: > > repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java > > Line 190 (original), 190 (patched) > > <https://reviews.apache.org/r/73058/diff/2/?file=2242687#file2242687line190> > > > > What is the reason for these queries changing? Refer above comment - Pinal ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73058/#review222281 ----------------------------------------------------------- On Dec. 3, 2020, 6:05 a.m., Pinal Shah wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73058/ > ----------------------------------------------------------- > > (Updated Dec. 3, 2020, 6:05 a.m.) > > > Review request for atlas, Ashutosh Mestry, Jayendra Parab, Madhan Neethiraj, > Nixon Rodrigues, and Sarath Subramanian. > > > Bugs: ATLAS-4057 > https://issues.apache.org/jira/browse/ATLAS-4057 > > > Repository: atlas > > > Description > ------- > > Supporting glossary term in advanced search, will allow user to search the > entities which are assigned to particular glossary term. > > > **WorkAround:** > > 'with' keyword is added to support glossary term. > > User needs to add fully qualifiedName of glossary term. > > > > **Example queries to search:** > > hive_table with "modernTrade@salesGlossary", > > hive_table with "modernTrade@salesGlossary" and hive_table isA Dimension > > > Diffs > ----- > > > repository/src/main/java/org/apache/atlas/discovery/TermSearchProcessor.java > 6c48a82f4 > repository/src/main/java/org/apache/atlas/query/DSLVisitor.java 700da955f > repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java > 249381059 > repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLLexer.g4 > 15d1bb4cb > repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLLexer.java > 142b9cac9 > repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLParser.g4 > f1c10600c > repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLParser.java > 6b33edb53 > > repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLParserBaseVisitor.java > 3139d4374 > > repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLParserVisitor.java > a1a727c82 > repository/src/test/java/org/apache/atlas/BasicTestSetup.java d733c1642 > > repository/src/test/java/org/apache/atlas/discovery/AtlasDiscoveryServiceTest.java > 1839e76c7 > repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java > 3bb3b07bf > > repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java > 487cf2778 > > > Diff: https://reviews.apache.org/r/73058/diff/4/ > > > Testing > ------- > > Added testcases in DSLQueriesTest.java > Precommit : > https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/245/ > > > Thanks, > > Pinal Shah > >