File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
vector/src/main/java/org/apache/arrow/vector/complex Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,13 @@ public abstract class AbstractStructVector extends AbstractContainerVector {
46
46
private ConflictPolicy conflictPolicy ;
47
47
48
48
static {
49
- String conflictPolicyStr =
50
- System .getProperty (STRUCT_CONFLICT_POLICY_JVM , ConflictPolicy .CONFLICT_REPLACE .toString ());
49
+ String conflictPolicyStr = System .getProperty (STRUCT_CONFLICT_POLICY_JVM );
51
50
if (conflictPolicyStr == null ) {
52
51
conflictPolicyStr = System .getenv (STRUCT_CONFLICT_POLICY_ENV );
53
52
}
53
+ if (conflictPolicyStr == null ) {
54
+ conflictPolicyStr = ConflictPolicy .CONFLICT_REPLACE .toString ();
55
+ }
54
56
ConflictPolicy conflictPolicy ;
55
57
try {
56
58
conflictPolicy = ConflictPolicy .valueOf (conflictPolicyStr .toUpperCase (Locale .ROOT ));
@@ -62,11 +64,11 @@ public abstract class AbstractStructVector extends AbstractContainerVector {
62
64
63
65
/** Policy to determine how to react when duplicate columns are encountered. */
64
66
public enum ConflictPolicy {
65
- // Ignore the conflict and append the field. This is the default behaviour
67
+ // Ignore the conflict and append the field.
66
68
CONFLICT_APPEND ,
67
69
// Keep the existing field and ignore the newer one.
68
70
CONFLICT_IGNORE ,
69
- // Replace the existing field with the newer one.
71
+ // Replace the existing field with the newer one. This is the default behaviour
70
72
CONFLICT_REPLACE ,
71
73
// Refuse the new field and error out.
72
74
CONFLICT_ERROR
You can’t perform that action at this time.
0 commit comments