in spark-load/spark-load-common/src/main/java/org/apache/doris/common/io/BitmapValue.java [267:315]
public void xor(BitmapValue other) {
switch (other.bitmapType) { // CHECKSTYLE IGNORE THIS LINE: missing switch default
case EMPTY:
break;
case SINGLE_VALUE:
switch (this.bitmapType) { // CHECKSTYLE IGNORE THIS LINE: missing switch default
case EMPTY:
add(other.singleValue);
break;
case SINGLE_VALUE:
if (this.singleValue != other.singleValue) {
add(other.singleValue);
} else {
clear();
}
break;
case BITMAP_VALUE:
if (!this.bitmap.contains(other.singleValue)) {
this.bitmap.add(other.singleValue);
} else {
this.bitmap.removeLong(other.singleValue);
convertToSmallerType();
}
break;
}
break;
case BITMAP_VALUE:
switch (this.bitmapType) { // CHECKSTYLE IGNORE THIS LINE: missing switch default
case EMPTY:
this.bitmap = other.bitmap;
this.bitmapType = BITMAP_VALUE;
break;
case SINGLE_VALUE:
this.bitmap = other.bitmap;
this.bitmapType = BITMAP_VALUE;
if (this.bitmap.contains(this.singleValue)) {
this.bitmap.removeLong(this.singleValue);
} else {
this.bitmap.add(this.bitmapType);
}
break;
case BITMAP_VALUE:
this.bitmap.xor(other.bitmap);
convertToSmallerType();
break;
}
break;
}
}