[
https://issues.apache.org/jira/browse/ATLAS-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16564526#comment-16564526
]
ASF subversion and git services commented on ATLAS-2325:
--------------------------------------------------------
Commit 917a0c09c4dddfe9e9a23322172e4213c6445455 in atlas's branch
refs/heads/branch-0.8 from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=atlas.git;h=917a0c0 ]
ATLAS-2325: fix to prevent duplicate elements in SET type attributes
(cherry picked from commit d5b438b5db08cc4ecff69912b425104cd7ecd924)
> Creating entity containing attribute of type set with duplicate values
> ----------------------------------------------------------------------
>
> Key: ATLAS-2325
> URL: https://issues.apache.org/jira/browse/ATLAS-2325
> Project: Atlas
> Issue Type: Bug
> Components: atlas-core
> Reporter: Sharmadha Sainath
> Assignee: Sarath Subramanian
> Priority: Major
> Fix For: 1.0.0
>
> Attachments: ATLAS-2325-branch-0.8.patch, ATLAS-2325.patch
>
>
> 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
> {code}
> {
> "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"
> }
> ]
> }
> {code}
> 2. Create entity of the type
> {code}
> "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":[]
> }
> }
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)