You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Ashutosh Mestry <am...@hortonworks.com> on 2018/01/11 23:05:07 UTC

Review Request 65101: DSL: Making 'where' Clause Optional

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65101/
-----------------------------------------------------------

Review request for atlas and Apoorv Naik.


Bugs: ATLAS-2356
    https://issues.apache.org/jira/browse/ATLAS-2356


Repository: atlas


Description
-------

**Background**
Please see JIRA.

**Approach**
_DSLVisitor_:
* Simple map records the sub-tree that is visited.
* Different paths are taken when processing queries with and without 'where' clause.
* Modify handling of nested claues to support additional query formats. (See below)

**Additional capabilities**
New capabilities include queries with where clauses with 'is' and 'has' operators.

```sql
 Table where Table isa Dimension and Table has clusterName
```


Diffs
-----

  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java ba007826 
  repository/src/main/java/org/apache/atlas/query/AtlasDSL.java b771447a 
  repository/src/main/java/org/apache/atlas/query/DSLVisitor.java 75be85f1 
  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 76f31a34 
  repository/src/main/java/org/apache/atlas/query/Lookup.java d09b2070 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 0f4316fc 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java f3afa34f 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 295509bb 


Diff: https://reviews.apache.org/r/65101/diff/1/


Testing
-------

**Unit tests**
- Additional tests.
- Each test within _DSLQueriesTest_ is now run with and without 'where' clause, thereby exercising existing suite.
- Additional tests added for verifying new capabilitites.

**Functional tests**
- Testing via UI by selecting 'Type' from drop down and then trying out where, select, groupby clauses.


Thanks,

Ashutosh Mestry


Re: Review Request 65101: DSL: Making 'where' Clause Optional

Posted by Ashutosh Mestry <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65101/
-----------------------------------------------------------

(Updated Jan. 12, 2018, 4:35 a.m.)


Review request for atlas and Apoorv Naik.


Changes
-------

Updates include: 
- Updated error handling.
- Support added for selecting active type.


Bugs: ATLAS-2356
    https://issues.apache.org/jira/browse/ATLAS-2356


Repository: atlas


Description (updated)
-------

**Background**
Please see JIRA.

**Approach**
_DSLVisitor_:
* Simple map records the sub-tree that is visited.
* Different paths are taken when processing queries with and without 'where' clause.
* Modify handling of nested claues to support additional query formats. (See below)

**Additional capabilities**
Existing queries with optional 'where':
```
 Table where name = "product_dim"
 Table name = "product_dim"
  Table name = "product_dim" and name = 'sales_fact'
```
New capabilities include queries with where clauses with 'is' and 'has' operators.

```sql
 Table where Table isa Dimension and Table has clusterName
```
_Active type on select_
Following query is now supported:
```
DB as d select d
```


Diffs (updated)
-----

  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java ba007826 
  repository/src/main/java/org/apache/atlas/query/AtlasDSL.java b771447a 
  repository/src/main/java/org/apache/atlas/query/DSLVisitor.java 75be85f1 
  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 76f31a34 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java d8221aa0 
  repository/src/main/java/org/apache/atlas/query/Lookup.java d09b2070 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 0f4316fc 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java f3afa34f 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 295509bb 


Diff: https://reviews.apache.org/r/65101/diff/2/

Changes: https://reviews.apache.org/r/65101/diff/1-2/


Testing
-------

**Unit tests**
- Additional tests.
- Each test within _DSLQueriesTest_ is now run with and without 'where' clause, thereby exercising existing suite.
- Additional tests added for verifying new capabilitites.

**Functional tests**
- Testing via UI by selecting 'Type' from drop down and then trying out where, select, groupby clauses.


Thanks,

Ashutosh Mestry


Re: Review Request 65101: DSL: Making 'where' Clause Optional

Posted by Ashutosh Mestry <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65101/
-----------------------------------------------------------

(Updated Jan. 11, 2018, 11:06 p.m.)


Review request for atlas and Apoorv Naik.


Changes
-------

Updates include: Removed formatting.


Bugs: ATLAS-2356
    https://issues.apache.org/jira/browse/ATLAS-2356


Repository: atlas


Description (updated)
-------

**Background**
Please see JIRA.

**Approach**
_DSLVisitor_:
* Simple map records the sub-tree that is visited.
* Different paths are taken when processing queries with and without 'where' clause.
* Modify handling of nested claues to support additional query formats. (See below)

**Additional capabilities**
Existing queries with optional 'where':
```
 Table where name = "product_dim"
 Table name = "product_dim"
  Table name = "product_dim" and name = 'sales_fact'
```
New capabilities include queries with where clauses with 'is' and 'has' operators.

```sql
 Table where Table isa Dimension and Table has clusterName
```


Diffs
-----

  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java ba007826 
  repository/src/main/java/org/apache/atlas/query/AtlasDSL.java b771447a 
  repository/src/main/java/org/apache/atlas/query/DSLVisitor.java 75be85f1 
  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 76f31a34 
  repository/src/main/java/org/apache/atlas/query/Lookup.java d09b2070 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 0f4316fc 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java f3afa34f 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 295509bb 


Diff: https://reviews.apache.org/r/65101/diff/1/


Testing
-------

**Unit tests**
- Additional tests.
- Each test within _DSLQueriesTest_ is now run with and without 'where' clause, thereby exercising existing suite.
- Additional tests added for verifying new capabilitites.

**Functional tests**
- Testing via UI by selecting 'Type' from drop down and then trying out where, select, groupby clauses.


Thanks,

Ashutosh Mestry