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 {
4646 private ConflictPolicy conflictPolicy ;
4747
4848 static {
49- String conflictPolicyStr =
50- System .getProperty (STRUCT_CONFLICT_POLICY_JVM , ConflictPolicy .CONFLICT_REPLACE .toString ());
49+ String conflictPolicyStr = System .getProperty (STRUCT_CONFLICT_POLICY_JVM );
5150 if (conflictPolicyStr == null ) {
5251 conflictPolicyStr = System .getenv (STRUCT_CONFLICT_POLICY_ENV );
5352 }
53+ if (conflictPolicyStr == null ) {
54+ conflictPolicyStr = ConflictPolicy .CONFLICT_REPLACE .toString ();
55+ }
5456 ConflictPolicy conflictPolicy ;
5557 try {
5658 conflictPolicy = ConflictPolicy .valueOf (conflictPolicyStr .toUpperCase (Locale .ROOT ));
@@ -62,11 +64,11 @@ public abstract class AbstractStructVector extends AbstractContainerVector {
6264
6365 /** Policy to determine how to react when duplicate columns are encountered. */
6466 public enum ConflictPolicy {
65- // Ignore the conflict and append the field. This is the default behaviour
67+ // Ignore the conflict and append the field.
6668 CONFLICT_APPEND ,
6769 // Keep the existing field and ignore the newer one.
6870 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
7072 CONFLICT_REPLACE ,
7173 // Refuse the new field and error out.
7274 CONFLICT_ERROR
You can’t perform that action at this time.
0 commit comments