public SerializerBuilder withBitmapIndex(@Nullable GenericIndexedWriter<ImmutableBitmap> bitmapIndexWriter) { if (bitmapIndexWriter == null) { flags |= Feature.NO_BITMAP_INDEX.getMask(); } else { flags &= ~Feature.NO_BITMAP_INDEX.getMask(); } this.bitmapIndexWriter = bitmapIndexWriter; return this; }
} else { rFlags = rVersion.equals(VERSION.UNCOMPRESSED_MULTI_VALUE) ? Feature.MULTI_VALUE.getMask() : NO_FLAGS;
public SerializerBuilder withBitmapIndex(@Nullable GenericIndexedWriter<ImmutableBitmap> bitmapIndexWriter) { if (bitmapIndexWriter == null) { flags |= Feature.NO_BITMAP_INDEX.getMask(); } else { flags &= ~Feature.NO_BITMAP_INDEX.getMask(); } this.bitmapIndexWriter = bitmapIndexWriter; return this; }
} else { rFlags = rVersion.equals(VERSION.UNCOMPRESSED_MULTI_VALUE) ? Feature.MULTI_VALUE.getMask() : NO_FLAGS;
public SerializerBuilder withValue(ColumnarIntsSerializer valueWriter, boolean hasMultiValue, boolean compressed) { this.valueWriter = valueWriter; if (hasMultiValue) { if (compressed) { this.version = VERSION.COMPRESSED; this.flags |= Feature.MULTI_VALUE_V3.getMask(); } else { this.version = VERSION.UNCOMPRESSED_MULTI_VALUE; this.flags |= Feature.MULTI_VALUE.getMask(); } } else { if (compressed) { this.version = VERSION.COMPRESSED; } else { this.version = VERSION.UNCOMPRESSED_SINGLE_VALUE; } } return this; }
public boolean isSet(int flags) { return (getMask() & flags) != 0; }
private static boolean mustWriteFlags(final int flags) { // Flags that are not implied by version codes < COMPRESSED must be written. This includes MULTI_VALUE_V3. return flags != NO_FLAGS && flags != Feature.MULTI_VALUE.getMask(); } }
public SerializerBuilder withValue(ColumnarIntsSerializer valueWriter, boolean hasMultiValue, boolean compressed) { this.valueWriter = valueWriter; if (hasMultiValue) { if (compressed) { this.version = VERSION.COMPRESSED; this.flags |= Feature.MULTI_VALUE_V3.getMask(); } else { this.version = VERSION.UNCOMPRESSED_MULTI_VALUE; this.flags |= Feature.MULTI_VALUE.getMask(); } } else { if (compressed) { this.version = VERSION.COMPRESSED; } else { this.version = VERSION.UNCOMPRESSED_SINGLE_VALUE; } } return this; }
public boolean isSet(int flags) { return (getMask() & flags) != 0; }
private static boolean mustWriteFlags(final int flags) { // Flags that are not implied by version codes < COMPRESSED must be written. This includes MULTI_VALUE_V3. return flags != NO_FLAGS && flags != Feature.MULTI_VALUE.getMask(); } }