atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashutosh Mestry <>
Subject Re: Review Request 65297: Advanced Search DSL: Support System Attributes within Query
Date Thu, 25 Jan 2018 05:41:19 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Jan. 25, 2018, 5:41 a.m.)

Review request for atlas and Apoorv Naik.


Updates include:
- Addressed review comments.
- Minor refactoring to unit tests.

Bugs: ATLAS-2418

Repository: atlas


Current implementation of DSL query does not support system attributes within the query.

The _AtlasEntity_ does not recognize system attributes as attributes. There isn't a way to
fetch all the system attributes for a given entity.

During vertex creation, system attributes are added to the vertex. They are part of the vertex,
hence the only way to fetch them is by having a vertex.

Adding vertex to _RegistryBasedLook_ will create additional dependency. It will also force
instantiation of an entity just for doing existence checks.

**Approach & Impact**
- Modify _hasAttribute_ to recognize system attributes as part of any type. Treat system attributes
as primitive types, modify _isPrimitive_.
- These are the attributes treated as system attributes:
  - __guid
  - __typeName
  - __createTime
  - __updateTime
  - __createdBy
  - __updatedBy

**New Queries Supported**
hive_db has __state
hive_db where hive_db has __state
hive_db as d where d.__state = 'ACTIVE'
hive_db select __guid
hive_db where __state = 'ACTIVE' select name, __guid, __state
hive_table where __state = 'DELETED'

Diffs (updated)

  repository/src/main/java/org/apache/atlas/query/ 9a213a32 
  repository/src/main/java/org/apache/atlas/query/ 95ba4617 
  repository/src/main/java/org/apache/atlas/query/ eef3463e 
  repository/src/test/java/org/apache/atlas/query/ c44eea3b 
  repository/src/test/java/org/apache/atlas/query/ 5b394cb2 




**Unit tests**
- Updated _GremlinQueryComposerTest_ to include additional tests.
- Updated _DSLQueriesTest_ to include additional tests.

**Funtional tests**
- Executed queries from within web ui.


Ashutosh Mestry

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message