Skip to content
Merged
Show file tree
Hide file tree
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 @@ -28,7 +28,6 @@
import org.apache.pinot.segment.local.segment.index.loader.bloomfilter.BloomFilterHandler;
import org.apache.pinot.segment.local.segment.index.readers.bloom.BloomFilterReaderFactory;
import org.apache.pinot.segment.spi.ColumnMetadata;
import org.apache.pinot.segment.spi.Constants;
import org.apache.pinot.segment.spi.V1Constants;
import org.apache.pinot.segment.spi.creator.IndexCreationContext;
import org.apache.pinot.segment.spi.index.AbstractIndexType;
Expand Down Expand Up @@ -99,7 +98,7 @@ protected ColumnConfigDeserializer<BloomFilterConfig> createDeserializerForLegac
@Override
public BloomFilterCreator createIndexCreator(IndexCreationContext context, BloomFilterConfig indexConfig) {
int cardinality = context.getCardinality();
if (cardinality == Constants.UNKNOWN_CARDINALITY) {
if (cardinality < 0) {
// This is when we're creating bloom filters for non dictionary encoded cols where exact cardinality is not
// known beforehand.
// Since this field is only used for the estimate cardinality, using total # of entries instead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ private Constants() {
}

public static final int EOF = Integer.MIN_VALUE;

// TODO: Consider modifying it to -1 to be more readable when stored in segment metadata. Reader accepts all negative
// values as unknown in release 1.6.0. Change writer side after 1.6.0 release.
public static final int UNKNOWN_CARDINALITY = Integer.MIN_VALUE;

public static final String HLL_LOG2M_KEY = "log2m";
Expand Down
Loading