@@ -15,26 +15,15 @@ public class TableColumn {
1515 private final Type type ;
1616 @ Nullable
1717 private final String family ;
18- private final boolean hasDefaultValue ;
1918 @ Nullable
2019 private final PrimitiveValue literalDefaultValue ;
2120 @ Nullable
2221 private final SequenceDescription sequenceDescription ;
2322
24- public TableColumn (String name , Type type , String family , boolean hasDefaultValue ) {
25- this .name = name ;
26- this .type = type ;
27- this .family = family ;
28- this .hasDefaultValue = hasDefaultValue ;
29- this .literalDefaultValue = null ;
30- this .sequenceDescription = null ;
31- }
32-
3323 public TableColumn (String name , Type type , @ Nullable String family , PrimitiveValue literalDefaultValue ) {
3424 this .name = name ;
3525 this .type = type ;
3626 this .family = family ;
37- this .hasDefaultValue = true ;
3827 this .literalDefaultValue = literalDefaultValue ;
3928 this .sequenceDescription = null ;
4029 }
@@ -43,13 +32,12 @@ public TableColumn(String name, Type type, @Nullable String family, SequenceDesc
4332 this .name = name ;
4433 this .type = type ;
4534 this .family = family ;
46- this .hasDefaultValue = true ;
4735 this .literalDefaultValue = null ;
4836 this .sequenceDescription = sequenceDescription ;
4937 }
5038
5139 public TableColumn (String name , Type type , String family ) {
52- this (name , type , family , false );
40+ this (name , type , family , ( PrimitiveValue ) null );
5341 }
5442
5543 public TableColumn (String name , Type type ) {
@@ -65,7 +53,7 @@ public Type getType() {
6553 }
6654
6755 public boolean hasDefaultValue () {
68- return hasDefaultValue ;
56+ return literalDefaultValue != null && sequenceDescription != null ;
6957 }
7058
7159 @ Nullable
0 commit comments