if (statistics.getNumNulls() == rowCount) { return Domain.onlyNull(type); boolean hasNullValue = statistics.getNumNulls() != 0L;
private boolean hasNulls(ColumnChunkMetaData column) { return column.getStatistics().getNumNulls() > 0; }
/** * Hash code for the statistics object * @return hash code int */ public int hashCode() { return 31 * Arrays.hashCode(getMaxBytes()) + 17 * Arrays.hashCode(getMinBytes()) + Long.valueOf(this.getNumNulls()).hashCode(); }
/** * Equality comparison method to compare two statistics objects. * @param stats Statistics object to compare against * @return true if objects are equal, false otherwise */ public boolean equals(Statistics stats) { return Arrays.equals(stats.getMaxBytes(), this.getMaxBytes()) && Arrays.equals(stats.getMinBytes(), this.getMinBytes()) && stats.getNumNulls() == this.getNumNulls(); }
private boolean isAllNulls(ColumnChunkMetaData column) { return column.getStatistics().getNumNulls() == column.getValueCount(); }
/** * Method to merge this statistics object with the object passed * as parameter. Merging keeps the smallest of min values, largest of max * values and combines the number of null counts. * @param stats Statistics object to merge with */ public void mergeStatistics(Statistics stats) { if (stats.isEmpty()) return; if (this.getClass() == stats.getClass()) { incrementNumNulls(stats.getNumNulls()); if (stats.hasNonNullValue()) { mergeStatisticsMinMax(stats); markAsNotEmpty(); } } else { throw new StatisticsClassException(this.getClass().toString(), stats.getClass().toString()); } }
public static Statistics toParquetStatistics(parquet.column.statistics.Statistics statistics) { Statistics stats = new Statistics(); if (!statistics.isEmpty()) { stats.setNull_count(statistics.getNumNulls()); if(statistics.hasNonNullValue()) { stats.setMax(statistics.getMaxBytes()); stats.setMin(statistics.getMinBytes()); } } return stats; }
pageWriter.writePageV2( pageRowCount, Ints.checkedCast(statistics.getNumNulls()), valueCount, path.getMaxRepetitionLevel() == 0 ? BytesInput.empty() : repetitionLevelColumn.toBytes(),
if (statistics.getNumNulls() == rowCount) { return Domain.onlyNull(type); boolean hasNullValue = statistics.getNumNulls() != 0L;