Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ public abstract class AbstractStructVector extends AbstractContainerVector {
private ConflictPolicy conflictPolicy;

static {
String conflictPolicyStr =
System.getProperty(STRUCT_CONFLICT_POLICY_JVM, ConflictPolicy.CONFLICT_REPLACE.toString());
String conflictPolicyStr = System.getProperty(STRUCT_CONFLICT_POLICY_JVM);
if (conflictPolicyStr == null) {
conflictPolicyStr = System.getenv(STRUCT_CONFLICT_POLICY_ENV);
}
if (conflictPolicyStr == null) {
conflictPolicyStr = ConflictPolicy.CONFLICT_REPLACE.toString();
}
ConflictPolicy conflictPolicy;
try {
conflictPolicy = ConflictPolicy.valueOf(conflictPolicyStr.toUpperCase(Locale.ROOT));
Expand All @@ -62,11 +64,11 @@ public abstract class AbstractStructVector extends AbstractContainerVector {

/** Policy to determine how to react when duplicate columns are encountered. */
public enum ConflictPolicy {
// Ignore the conflict and append the field. This is the default behaviour
// Ignore the conflict and append the field.
CONFLICT_APPEND,
// Keep the existing field and ignore the newer one.
CONFLICT_IGNORE,
// Replace the existing field with the newer one.
// Replace the existing field with the newer one. This is the default behaviour
CONFLICT_REPLACE,
// Refuse the new field and error out.
CONFLICT_ERROR
Expand Down
Loading