Paresh Devalia created ATLAS-5032:
-------------------------------------
Summary: Basic search using qualifiedName with "starts with" and
"ends with" operators does not return results for long entity names.
Key: ATLAS-5032
URL: https://issues.apache.org/jira/browse/ATLAS-5032
Project: Atlas
Issue Type: Bug
Reporter: Paresh Devalia
Assignee: Paresh Devalia
We created a hive_table entity in Apache Atlas with the following details:
* name: A string with 370 characters.
* qualifiedName: In the format default.<entity_name>@primary, where
<entity_name> is the same 370-character string.
Despite the entity being successfully created and visible through direct entity
retrieval, *basic search queries using attribute filters on* *qualifiedName*
*are not returning results* when using an AND condition with the following
filters:
# qualifiedName *starts with* default.<entity_name>
# qualifiedName *ends with* @primary
*Steps to Reproduce:*
# Create an entity with a long name and corresponding qualified name using the
following curl command:
|curl --location --request POST 'http://localhost:21000/api/atlas/v2/entity' \
-u <username>:<password> \
--header 'Content-Type: application/json' \
--data-raw '{
"entity": {
"typeName": "hive_table",
"attributes": {
"aliases": [],
"comment": null,
"createTime": "1669974016149",
"description": "entity_370",
"displayName": null,
"lastAccessTime": 1234567890999,
"name":
"name370oootphvx6vovxzedvv0sjaivlmn0b9pdkdd8lbctngkptfxv5yibzaffjtr7aa7n8cnlqcnamcxhsul8vxx6spcwoy5l6bmov44r8ympwm3hidmrztzcgvgyyuhi4h6egtanqb7t1aws0aodvpd3bqvl5ji1frfsznupfw4uqrsrdfdcy39hetlhq3aan8ogzr3nshgnpurskhkzvt8xov12yplobpfqble2b1zsq2gz1s5vliud1fihec4i2euiuqwiuyiyiwyeiuewawdsedvkjsljh234jh23k4h2j3h4k234hj23h4hj2h3j4j2h34kjkjh23k4jhk23k23jh4kh234kj32h4j32jh4j3a",
"owner": "dev",
"parameters": null,
"qualifiedName":
"default.name370oootphvx6vovxzedvv0sjaivlmn0b9pdkdd8lbctngkptfxv5yibzaffjtr7aa7n8cnlqcnamcxhsul8vxx6spcwoy5l6bmov44r8ympwm3hidmrztzcgvgyyuhi4h6egtanqb7t1aws0aodvpd3bqvl5ji1frfsznupfw4uqrsrdfdcy39hetlhq3aan8ogzr3nshgnpurskhkzvt8xov12yplobpfqble2b1zsq2gz1s5vliud1fihec4i2euiuqwiuyiyiwyeiuewawdsedvkjsljh234jh23k4h2j3h4k234hj23h4hj2h3j4j2h34kjkjh23k4jhk23k23jh4kh234kj32h4j32jh4j3a@primary",
"replicatedFrom": [],
"replicatedTo": [],
"retention": null,
"tableType": null,
"temporary": null,
"userDescription": null,
"viewExpandedText": null,
"viewOriginalText": null
}
},
"referredEntities": {}
}'|
# Perform a basic search using attribute filters:
# qualifiedName starts with default.<370_char_string>
# qualifiedName ends with @primary
# Curl request as below
|curl 'http://127.0.0.1:21000/api/atlas/v2/search/basic' \
-u <username>:<password> \
--header 'Content-Type: application/json' \
--data-raw '{
"excludeDeletedEntities": true,
"includeSubClassifications": true,
"includeSubTypes": true,
"includeClassificationAttributes": true,
"entityFilters": {
"condition": "AND",
"criterion": [
{
"attributeName": "qualifiedName",
"operator": "startsWith",
"attributeValue":
"default.name370oootphvx6vovxzedvv0sjaivlmn0b9pdkdd8lbctngkptfxv5yibzaffjtr7aa7n8cnlqcnamcxhsul8vxx6spcwoy5l6bmov44r8ympwm3hidmrztzcgvgyyuhi4h6egtanqb7t1aws0aodvpd3bqvl5ji1frfsznupfw4uqrsrdfdcy39hetlhq3aan8ogzr3nshgnpurskhkzvt8xov12yplobpfqble2b1zsq2gz1s5vliud1fihec4i2euiuqwiuyiyiwyeiuewawdsedvkjsljh234jh23k4h2j3h4k234hj23h4hj2h3j4j2h34kjkjh23k4jhk23k23jh4kh234kj32h4j32jh4j3a"
},
{
"attributeName": "qualifiedName",
"operator": "endsWith",
"attributeValue": "@primary"
}
]
},
"tagFilters": null,
"attributes": [
"qualifiedName"
],
"limit": 25,
"offset": 0,
"typeName": "hive_table",
"classification": null,
"termName": null
}'|
--
This message was sent by Atlassian Jira
(v8.20.10#820010)