@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetPage_type()) ? 131071 : 524287); if (isSetPage_type()) hashCode = hashCode * 8191 + page_type.getValue(); hashCode = hashCode * 8191 + ((isSetEncoding()) ? 131071 : 524287); if (isSetEncoding()) hashCode = hashCode * 8191 + encoding.getValue(); hashCode = hashCode * 8191 + count; return hashCode; }
private static void addKeyValue(FileMetaData fileMetaData, String key, String value) { KeyValue keyValue = new KeyValue(key); keyValue.value = value; fileMetaData.addToKey_value_metadata(keyValue); }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + num_values; hashCode = hashCode * 8191 + ((isSetEncoding()) ? 131071 : 524287); if (isSetEncoding()) hashCode = hashCode * 8191 + encoding.getValue(); hashCode = hashCode * 8191 + ((isSetIs_sorted()) ? 131071 : 524287); if (isSetIs_sorted()) hashCode = hashCode * 8191 + ((is_sorted) ? 131071 : 524287); return hashCode; }
public void writeDictionaryPageHeader( int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) throws IOException { PageHeader pageHeader = new PageHeader(PageType.DICTIONARY_PAGE, uncompressedSize, compressedSize); pageHeader.setDictionary_page_header(new DictionaryPageHeader(valueCount, getEncoding(valuesEncoding))); writePageHeader(pageHeader, to); }
static long getOffset(ColumnChunk columnChunk) { ColumnMetaData md = columnChunk.getMeta_data(); long offset = md.getData_page_offset(); if (md.isSetDictionary_page_offset() && offset > md.getDictionary_page_offset()) { offset = md.getDictionary_page_offset(); } return offset; }
static org.apache.parquet.format.TimeUnit convertUnit(LogicalTypeAnnotation.TimeUnit unit) { switch (unit) { case MICROS: return org.apache.parquet.format.TimeUnit.MICROS(new MicroSeconds()); case MILLIS: return org.apache.parquet.format.TimeUnit.MILLIS(new MilliSeconds()); case NANOS: return TimeUnit.NANOS(new NanoSeconds()); default: throw new RuntimeException("Unknown time unit " + unit); } }
public static FileMetaData readFileMetaData(InputStream from) throws IOException { return read(from, new FileMetaData()); } /**
public static LogicalType DECIMAL(int scale, int precision) { return LogicalType.DECIMAL(new DecimalType(scale, precision)); }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + numBytes; hashCode = hashCode * 8191 + ((isSetAlgorithm()) ? 131071 : 524287); if (isSetAlgorithm()) hashCode = hashCode * 8191 + algorithm.hashCode(); hashCode = hashCode * 8191 + ((isSetHash()) ? 131071 : 524287); if (isSetHash()) hashCode = hashCode * 8191 + hash.hashCode(); return hashCode; }
/** * Performs a deep copy on <i>other</i>. */ public BloomFilterPageHeader(BloomFilterPageHeader other) { __isset_bitfield = other.__isset_bitfield; this.numBytes = other.numBytes; if (other.isSetAlgorithm()) { this.algorithm = new BloomFilterAlgorithm(other.algorithm); } if (other.isSetHash()) { this.hash = new BloomFilterHash(other.hash); } }
public void writeDictionaryPageHeader( int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) throws IOException { PageHeader pageHeader = new PageHeader(PageType.DICTIONARY_PAGE, uncompressedSize, compressedSize); pageHeader.setDictionary_page_header(new DictionaryPageHeader(valueCount, getEncoding(valuesEncoding))); writePageHeader(pageHeader, to); }
static long getOffset(ColumnChunk columnChunk) { ColumnMetaData md = columnChunk.getMeta_data(); long offset = md.getData_page_offset(); if (md.isSetDictionary_page_offset() && offset > md.getDictionary_page_offset()) { offset = md.getDictionary_page_offset(); } return offset; }
private static void addKeyValue(FileMetaData fileMetaData, String key, String value) { KeyValue keyValue = new KeyValue(key); keyValue.value = value; fileMetaData.addToKey_value_metadata(keyValue); }
public static FileMetaData readFileMetaData(InputStream from) throws IOException { return read(from, new FileMetaData()); } /**