Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Creating an entity having an attribute of type set with duplicate values is expected to have only unique values. But duplicate values are retained.
Example : POSTing [1,2,3,1] stored as [1,2,3,1]. Expected is [1,2,3]
Repro :
1. POST the following JSON to /api/atlas/v2/types/typedefs
{ "enumDefs":[ ], "structDefs":[ ], "classificationDefs":[ ], "entityDefs":[ { "superTypes":[ ], "attributeDefs":[ { "name":"type_set", "typeName":"array<string>", "isOptional":true, "cardinality":"SET", "valuesMinCount":-1, "valuesMaxCount":-1, "isUnique":false, "isIndexable":false } ], "category":"ENTITY", "guid":"kcdnvdsvsdvidnvidsonvosid", "createdBy":"USER", "updatedBy":"USER", "createTime":12345, "updateTime":12345, "version":12345, "name":"simple_entity_type_set", "description":"simple_entity_type_set", "typeVersion":"0.1" } ] }
2. Create entity of the type
"referredEntities":{}, "entity":{ "typeName":"simple_entity_type_set", "attributes":{ "type_set":["a","a","b"] }, "guid":"-1", "status":"ACTIVE", "createdBy":"admin", "updatedBy":"admin", "createTime":1489585008165, "updateTime":1489585008801, "version":0, "classifications":[], "superTypes":[] } }
3. entity is created with value for type_set as [a,a,b] instead of [a,b]
This is a regression in V1 APIs and seen in V2 APIs too.
Attachments
Attachments
Issue Links
- relates to
-
ATLAS-2851 Retrieving entity with SET attribute contains duplicate entries if attribute type updated from LIST to SET
- Patch Available