[
https://issues.apache.org/jira/browse/ATLAS-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paresh Devalia updated ATLAS-5005:
----------------------------------
Description:
When performing a basic search via the Atlas API, the filter with an invalid
operator (e.g., {{{}"operator": "paresh"{}}}) results in returning all
entities, instead of applying the filter correctly. In the Atlas UI, however,
the filtering works as expected.
h3. Steps to Reproduce:
# Send a POST request to the {{/api/atlas/v2/search/basic}} endpoint with the
following payload
{code:java}
{
"excludeDeletedEntities": true,
"includeSubClassifications": true,
"includeSubTypes": true,
"includeClassificationAttributes": true,
"entityFilters": {
"condition": "AND",
"criterion": [
{
"attributeName": "name",
"operator": "paresh",
"attributeValue": "paresh7"
}
]
},
"tagFilters": null,
"attributes": [],
"limit": 25,
"offset": 0,
"typeName": "hive_table",
"classification": null,
"termName": null
}
{code}
2. Observe that all entities are returned, rather than filtering based
on the operator provided.
h3. Expected Behavior:
* The API should correctly filter entities based on the valid operators
specified by Atlas (e.g., {{{}={}}}, {{{}!={}}}, {{{}contains{}}},
{{{}begin_with{}}}, {{{}ends_with{}}}, {{{}is_null{}}}, {{{}not_null{}}}).
* The filter should only return entities that match the criteria specified in
the request.
* Need to validate "{color:#172b4d}condition{color}" paramter in
FilterCriteria
was:
When performing a basic search via the Atlas API, the filter with an invalid
operator (e.g., {{{}"operator": "paresh"{}}}) results in returning all
entities, instead of applying the filter correctly. In the Atlas UI, however,
the filtering works as expected.
h3. Steps to Reproduce:
# Send a POST request to the {{/api/atlas/v2/search/basic}} endpoint with the
following payload
{code:java}
{
"excludeDeletedEntities": true,
"includeSubClassifications": true,
"includeSubTypes": true,
"includeClassificationAttributes": true,
"entityFilters": {
"condition": "AND",
"criterion": [
{
"attributeName": "name",
"operator": "paresh",
"attributeValue": "paresh7"
}
]
},
"tagFilters": null,
"attributes": [],
"limit": 25,
"offset": 0,
"typeName": "hive_table",
"classification": null,
"termName": null
}
{code}
2. Observe that all entities are returned, rather than filtering based
on the operator provided.
h3. Expected Behavior:
* The API should correctly filter entities based on the valid operators
specified by Atlas (e.g., {{{}={}}}, {{{}!={}}}, {{{}contains{}}},
{{{}begin_with{}}}, {{{}ends_with{}}}, {{{}is_null{}}}, {{{}not_null{}}}).
* The filter should only return entities that match the criteria specified in
the request.
* Need to validate "{color:#172b4d}condition{color}"
> Basic search entity filter validation
> -------------------------------------
>
> Key: ATLAS-5005
> URL: https://issues.apache.org/jira/browse/ATLAS-5005
> Project: Atlas
> Issue Type: Bug
> Components: atlas-core
> Reporter: Paresh Devalia
> Assignee: Aditya Gupta
> Priority: Major
>
> When performing a basic search via the Atlas API, the filter with an invalid
> operator (e.g., {{{}"operator": "paresh"{}}}) results in returning all
> entities, instead of applying the filter correctly. In the Atlas UI, however,
> the filtering works as expected.
> h3. Steps to Reproduce:
> # Send a POST request to the {{/api/atlas/v2/search/basic}} endpoint with
> the following payload
> {code:java}
> {
> "excludeDeletedEntities": true,
> "includeSubClassifications": true,
> "includeSubTypes": true,
> "includeClassificationAttributes": true,
> "entityFilters": {
> "condition": "AND",
> "criterion": [
> {
> "attributeName": "name",
> "operator": "paresh",
> "attributeValue": "paresh7"
> }
> ]
> },
> "tagFilters": null,
> "attributes": [],
> "limit": 25,
> "offset": 0,
> "typeName": "hive_table",
> "classification": null,
> "termName": null
> }
> {code}
> 2. Observe that all entities are returned, rather than filtering based
> on the operator provided.
> h3. Expected Behavior:
> * The API should correctly filter entities based on the valid operators
> specified by Atlas (e.g., {{{}={}}}, {{{}!={}}}, {{{}contains{}}},
> {{{}begin_with{}}}, {{{}ends_with{}}}, {{{}is_null{}}}, {{{}not_null{}}}).
> * The filter should only return entities that match the criteria specified
> in the request.
> * Need to validate "{color:#172b4d}condition{color}" paramter in
> FilterCriteria
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)