@Override public void hashValues(DimensionSelector dimSelector, HyperLogLogCollector collector) { IndexedInts row = dimSelector.getRow(); for (int i = 0, rowSize = row.size(); i < rowSize; i++) { int index = row.get(i); final String value = dimSelector.lookupName(index); // SQL standard spec does not count null values, // Skip counting null values when we are not replacing null with default value. // A special value for null in case null handling is configured to use empty string for null. if (NullHandling.replaceWithDefault() || value != null) { collector.add(CardinalityAggregator.hashFn.hashUnencodedChars(nullToSpecial(value)).asBytes()); } } }
final String value = dimSelector.lookupName(row.get(0)); if (NullHandling.replaceWithDefault() || value != null) { hasher.putUnencodedChars(nullToSpecial(value)); hasNonNullValue = true; values[i] = nullToSpecial(value);
@Override public void hashValues(DimensionSelector dimSelector, HyperLogLogCollector collector) { IndexedInts row = dimSelector.getRow(); for (int i = 0, rowSize = row.size(); i < rowSize; i++) { int index = row.get(i); final String value = dimSelector.lookupName(index); // SQL standard spec does not count null values, // Skip counting null values when we are not replacing null with default value. // A special value for null in case null handling is configured to use empty string for null. if (NullHandling.replaceWithDefault() || value != null) { collector.add(CardinalityAggregator.hashFn.hashUnencodedChars(nullToSpecial(value)).asBytes()); } } }
final String value = dimSelector.lookupName(row.get(0)); if (NullHandling.replaceWithDefault() || value != null) { hasher.putUnencodedChars(nullToSpecial(value)); hasNonNullValue = true; values[i] = nullToSpecial(value);