----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59881/#review177698 -----------------------------------------------------------
intg/src/main/java/org/apache/atlas/type/AtlasArrayType.java Lines 209 (patched) <https://reviews.apache.org/r/59881/#comment251422> here 'obj' will either be a List or a Set. This 'if' block should be moved just prior to line #204. intg/src/main/java/org/apache/atlas/type/AtlasEnumType.java Lines 69 (patched) <https://reviews.apache.org/r/59881/#comment251424> This override seems unnecessary. Base class implementation in AtlasType.createDefaultValue(defaultValue) should be enough. intg/src/main/java/org/apache/atlas/type/AtlasStructType.java Lines 279 (patched) <https://reviews.apache.org/r/59881/#comment251426> this doesn't seem necessary. intg/src/main/java/org/apache/atlas/type/AtlasStructType.java Line 483 (original), 496 (patched) <https://reviews.apache.org/r/59881/#comment251425> dataType.createDefaultValue() ==> dataType.createDefaultValue(attributeDef.getDefaultValue()); - Madhan Neethiraj On June 12, 2017, 2:14 p.m., Ruchi Solani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59881/ > ----------------------------------------------------------- > > (Updated June 12, 2017, 2:14 p.m.) > > > Review request for atlas, Apoorv Naik, Madhan Neethiraj, Nixon Rodrigues, and > Sarath Subramanian. > > > Bugs: ATLAS-1863 > https://issues.apache.org/jira/browse/ATLAS-1863 > > > Repository: atlas > > > Description > ------- > > While creating entity if attribute value are not set explicitly for primitive > type which are optional, then default value should be set from attributedef. > > > Diffs > ----- > > intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java > aee4907 > intg/src/main/java/org/apache/atlas/type/AtlasArrayType.java 2d386f1 > intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java 6516d48 > intg/src/main/java/org/apache/atlas/type/AtlasEnumType.java 1cd27b3 > intg/src/main/java/org/apache/atlas/type/AtlasMapType.java 385a9ae > intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 0eeaf9c > intg/src/main/java/org/apache/atlas/type/AtlasType.java 28d0a07 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasStructDefStoreV1.java > 1c6cfc7 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java > 80cd1ee > > > Diff: https://reviews.apache.org/r/59881/diff/2/ > > > Testing > ------- > > 1. created Type using API with defaultValue attribute, and tested its entity > creation with default value being set in entity attribute. > 2. Tested on different primitive types attributes. > 3. Ran Unit tests using mvn clean install > Two unit test failing: > > HardDeleteHandlerV1Test>AtlasDeleteHandlerV1Test.testDisconnectUnidirectionalArrayReferenceFromStructAndTraitTypes:617 > » AtlasBase > > SoftDeleteHandlerV1Test>AtlasDeleteHandlerV1Test.testDisconnectUnidirectionalArrayReferenceFromStructAndTraitTypes:617 > » AtlasBase > > > Thanks, > > Ruchi Solani > >