> On May 16, 2017, 2:22 p.m., David Radley wrote: > > repository/src/main/java/org/apache/atlas/gremlin/Gremlin3ExpressionFactory.java > > Lines 248 (patched) > > <https://reviews.apache.org/r/59321/diff/1/?file=1721798#file1721798line248> > > > > I am wondering whether it is possible to define an entity name or > > attribute name with a ? or * - if you quote the names. > > I wonder what the expected behaviour for search strings like *?** or > > the like. > > > > I suggest the unit tests include tests for : > > - entity and attribute names with spaces in > > - so we support entity and attribute names with dots in? > > - leading *, ? > > - ending * , ? > > - middle *,? > > - match on one character names > > - test maximum length names. > > -
David, type names follow a regex pattern of [a-zA-Z][a-zA-Z0-9_ ]*, but attribute name can include special characters including (* or ?). In DSL, if attribute names have special characters it results in query parsing error (when translating DSL->Gremlin). This is an atlas limitation and needs to be fixed - but outside the scope of this JIRA. The 'like' operator works fine for attribute values having * or ? in them. I validated them. Added unit tests. - Sarath ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59321/#review175161 ----------------------------------------------------------- On May 16, 2017, 5:05 p.m., Sarath Subramanian wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59321/ > ----------------------------------------------------------- > > (Updated May 16, 2017, 5:05 p.m.) > > > Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and > Suma Shivaprasad. > > > Bugs: ATLAS-1807 > https://issues.apache.org/jira/browse/ATLAS-1807 > > > Repository: atlas > > > Description > ------- > > Current DSL search doesn't support wildcard searches, this JIRA will > introduce a new operator in DSL for wildcard - "like" > eg. > hive_table where name like "employee*" > hive_column where qualifiedName like "defa?lt*" > hive_column where name like "loc*" and position=5 and qualifiedName like > "default.employee2*" > > > Diffs > ----- > > > repository/src/main/java/org/apache/atlas/gremlin/Gremlin2ExpressionFactory.java > 807dd055 > > repository/src/main/java/org/apache/atlas/gremlin/Gremlin3ExpressionFactory.java > 9f68c9a0 > > repository/src/main/java/org/apache/atlas/gremlin/GremlinExpressionFactory.java > ff5a58c9 > repository/src/main/scala/org/apache/atlas/query/GremlinQuery.scala > 3a310a77 > repository/src/main/scala/org/apache/atlas/query/QueryParser.scala 8d454e94 > > repository/src/test/java/org/apache/atlas/discovery/GraphBackedDiscoveryServiceTest.java > 18573fc8 > > webapp/src/test/java/org/apache/atlas/web/resources/EntityDiscoveryJerseyResourceIT.java > db3a7c36 > > > Diff: https://reviews.apache.org/r/59321/diff/3/ > > > Testing > ------- > > Added IT, UT in progress. > > > Thanks, > > Sarath Subramanian > >