-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65133/
-----------------------------------------------------------
(Updated Jan. 13, 2018, 6:30 a.m.)
Review request for atlas and Apoorv Naik.
Changes
-------
Updates include:
- Error message display for null values.
- Fixed handling of custom types with collection that include primitive and
non-primitive types.
- Refactoring of _RegistryBasedLookup_.
Bugs: ATLAS-2360
https://issues.apache.org/jira/browse/ATLAS-2360
Repository: atlas
Description
-------
**Background**
The _GremlinQueryComposer.errorList_ used earlier in the implementation was not
getting populated correctly. The errors encountered in the process were not
getting displayed.
**Approach**
The _GremlinQueryComposer.errorList_ is now being populated at different point
in the parsing process.
_AtlasDSL_ has been updated to process the errors and throw exceptions.
Additional refactoring in _IdentifierHelper_ when processing _qualifiedName_.
**Queries**
The following query displays an error since 'name' is not attribute of
_hive_storagedescriptor_:
```
hive_table select sd.name
```
Diffs (updated)
-----
intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 0953725c
repository/src/main/java/org/apache/atlas/query/AtlasDSL.java 7817f91a
repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
fe2d6d7f
repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java
d8221aa0
repository/src/main/java/org/apache/atlas/query/Lookup.java fa75cfbd
repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java
b78bd2e5
repository/src/main/java/org/apache/atlas/query/SelectClauseComposer.java
b93e2234
repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 5db55dce
repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java
3fcd3256
Diff: https://reviews.apache.org/r/65133/diff/5/
Changes: https://reviews.apache.org/r/65133/diff/4-5/
Testing (updated)
-------
**Unit tests**
- New tests added for processing exceptions.
**Functional tests**
- Verified cases where error is displayed.
**Custom Types testing**
See attached custom _typeDef_ and _entityDef_. Use these CURL calls to update
your system with the new definitions:
```
curl -X POST -u admin:admin -H 'Content-Type: application/json' -d
@type_def.json "http://localhost:21000/api/atlas/v2/types/typedefs"
curl -X POST -u admin:admin -H 'Content-Type: application/json' -d
@entity_def.json "http://localhost:21000/api/atlas/v2/entity"
```
Now run these queries:
```
test_type where name="test_entity_1" select type_arr_list
test_type where name="test_entity_1" select type_map
```
File Attachments (updated)
----------------
entity_def.json
https://reviews.apache.org/media/uploaded/files/2018/01/13/be2530fa-18f0-4474-b034-9bc7f2c6dff5__entity_def.json
type_def.json
https://reviews.apache.org/media/uploaded/files/2018/01/13/6860b20e-6115-46b1-a265-4010c1012fe7__type_def.json
Thanks,
Ashutosh Mestry