You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Madhan Neethiraj (JIRA)" <ji...@apache.org> on 2018/01/12 23:22:00 UTC
[jira] [Updated] (ATLAS-2325) Creating entity containing attribute
of type set with duplicate values
[ https://issues.apache.org/jira/browse/ATLAS-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Madhan Neethiraj updated ATLAS-2325:
------------------------------------
Attachment: ATLAS-2325.patch
> 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
> Fix For: 1.0.0
>
> Attachments: 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
(v6.4.14#64029)