----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73453/#review223232 -----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java Line 118 (original), 119 (patched) <https://reviews.apache.org/r/73453/#comment312324> For type hive_table, this would change the prefix from "__hive_table" => "__attribute.hive_table". I suggest to use following prefix: "__hive_table._attr". Note that attribute names in struct/entity/classification/relationship can't begin with a leading underscore; hence use of prefix "_attr" is safe. public static final String ATTRIBUTE_PREFIX = "._attr"; public static String getTypeDefPropertyKey(String typeName) { return PROPERTY_PREFIX + typeName + ATTRIBUTE_PREFIX; } public static String getTypeDefPropertyKey(String typeName, String child) { return PROPERTY_PREFIX + typeName + ATTRIBUTE_PREFIX + "." + child; } - Madhan Neethiraj On July 12, 2021, 2:41 p.m., Nixon Rodrigues wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73453/ > ----------------------------------------------------------- > > (Updated July 12, 2021, 2:41 p.m.) > > > Review request for atlas, Ashutosh Mestry, Jayendra Parab, Madhan Neethiraj, > Nikhil Bonte, Pinal Shah, and Sarath Subramanian. > > > Bugs: ATLAS-4353 > https://issues.apache.org/jira/browse/ATLAS-4353 > > > Repository: atlas > > > Description > ------- > > In Atlas, when we create a new classification with name of "name", then the > result is it will create a classification named "[]" after that if we tried > to remove it then it will failed and even we tried with API to remove the > "[]" classification, it will responding with invalid name error. > > In the Graph store classification name is set with property __type.name in > vertex and the list of attribute name of classification are set with property > *__type.<classificationName>* in same vertex. > If classification name is set with name as "name" , then property __type.name > = "name" is overridden by classification attributes with property > __type.<classificationName> to empty array [ ie *__type.name=[[]]*.] > > > Diffs > ----- > > repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java > ff7fd150e > > repository/src/main/java/org/apache/atlas/repository/patches/AtlasPatchManager.java > fae28c440 > > repository/src/main/java/org/apache/atlas/repository/patches/RenameClassificationAttributeArrayKey.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEnumDefStoreV2.java > 5c02105fe > > repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java > e73f084b8 > > > Diff: https://reviews.apache.org/r/73453/diff/2/ > > > Testing > ------- > > Tested create types with name "name" with different category. > Also tested java patch in upgrade scenario. > > https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/744/console > > > Thanks, > > Nixon Rodrigues > >