public java.lang.Object getFieldValue(_Fields field) { switch (field) { case FILE_PATH: return getFile_path(); case FILE_OFFSET: return getFile_offset(); case META_DATA: return getMeta_data(); case OFFSET_INDEX_OFFSET: return getOffset_index_offset(); case OFFSET_INDEX_LENGTH: return getOffset_index_length(); case COLUMN_INDEX_OFFSET: return getColumn_index_offset(); case COLUMN_INDEX_LENGTH: return getColumn_index_length(); } throw new java.lang.IllegalStateException(); }
public ColumnChunk deepCopy() { return new ColumnChunk(this); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case FILE_PATH: return isSetFile_path(); case FILE_OFFSET: return isSetFile_offset(); case META_DATA: return isSetMeta_data(); case OFFSET_INDEX_OFFSET: return isSetOffset_index_offset(); case OFFSET_INDEX_LENGTH: return isSetOffset_index_length(); case COLUMN_INDEX_OFFSET: return isSetColumn_index_offset(); case COLUMN_INDEX_LENGTH: return isSetColumn_index_length(); } throw new IllegalStateException(); }
private static IndexReference toColumnIndexReference(ColumnChunk columnChunk) { if (columnChunk.isSetColumn_index_offset() && columnChunk.isSetColumn_index_length()) { return new IndexReference(columnChunk.getColumn_index_offset(), columnChunk.getColumn_index_length()); } return null; }
private static IndexReference toOffsetIndexReference(ColumnChunk columnChunk) { if (columnChunk.isSetOffset_index_offset() && columnChunk.isSetOffset_index_length()) { return new IndexReference(columnChunk.getOffset_index_offset(), columnChunk.getOffset_index_length()); } return null; }
List<ColumnChunk> parquetColumns = new ArrayList<ColumnChunk>(); for (ColumnChunkMetaData columnMetaData : columns) { ColumnChunk columnChunk = new ColumnChunk(columnMetaData.getFirstDataPageOffset()); // verify this is the right offset columnChunk.setColumn_index_offset(columnIndexRef.getOffset()); columnChunk.setColumn_index_length(columnIndexRef.getLength()); columnChunk.setOffset_index_offset(offsetIndexRef.getOffset()); columnChunk.setOffset_index_length(offsetIndexRef.getLength());
for (int _i44 = 0; _i44 < _list42.size; ++_i44) _elem43 = new ColumnChunk(); _elem43.read(iprot); struct.columns.add(_elem43);
List<ColumnChunk> columns = rowGroup.getColumns(); validateParquet(!columns.isEmpty(), "No columns in row group: %s", rowGroup); String filePath = columns.get(0).getFile_path(); for (ColumnChunk columnChunk : columns) { validateParquet( (filePath == null && columnChunk.getFile_path() == null) || (filePath != null && filePath.equals(columnChunk.getFile_path())), "all column chunks of the same row group must be in the same file"); ColumnMetaData metaData = columnChunk.meta_data;
static FileMetaData filterFileMetaDataByMidpoint(FileMetaData metaData, RangeMetadataFilter filter) { List<RowGroup> rowGroups = metaData.getRow_groups(); List<RowGroup> newRowGroups = new ArrayList<RowGroup>(); for (RowGroup rowGroup : rowGroups) { long totalSize = 0; long startIndex = getOffset(rowGroup.getColumns().get(0)); for (ColumnChunk col : rowGroup.getColumns()) { totalSize += col.getMeta_data().getTotal_compressed_size(); } long midPoint = startIndex + totalSize / 2; if (filter.contains(midPoint)) { newRowGroups.add(rowGroup); } } metaData.setRow_groups(newRowGroups); return metaData; }
for (int _i44 = 0; _i44 < _list42.size; ++_i44) _elem43 = new ColumnChunk(); _elem43.read(iprot); struct.columns.add(_elem43);
List<ColumnChunk> columns = rowGroup.getColumns(); validateParquet(!columns.isEmpty(), "No columns in row group: %s", rowGroup); String filePath = columns.get(0).getFile_path(); for (ColumnChunk columnChunk : columns) { validateParquet( (filePath == null && columnChunk.getFile_path() == null) || (filePath != null && filePath.equals(columnChunk.getFile_path())), "all column chunks of the same row group must be in the same file"); ColumnMetaData metaData = columnChunk.meta_data;
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; }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case FILE_PATH: return isSetFile_path(); case FILE_OFFSET: return isSetFile_offset(); case META_DATA: return isSetMeta_data(); case OFFSET_INDEX_OFFSET: return isSetOffset_index_offset(); case OFFSET_INDEX_LENGTH: return isSetOffset_index_length(); case COLUMN_INDEX_OFFSET: return isSetColumn_index_offset(); case COLUMN_INDEX_LENGTH: return isSetColumn_index_length(); } throw new java.lang.IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case FILE_PATH: return getFile_path(); case FILE_OFFSET: return getFile_offset(); case META_DATA: return getMeta_data(); case OFFSET_INDEX_OFFSET: return getOffset_index_offset(); case OFFSET_INDEX_LENGTH: return getOffset_index_length(); case COLUMN_INDEX_OFFSET: return getColumn_index_offset(); case COLUMN_INDEX_LENGTH: return getColumn_index_length(); } throw new IllegalStateException(); }
for (int _i34 = 0; _i34 < _list32.size; ++_i34) _elem33 = new ColumnChunk(); _elem33.read(iprot); struct.columns.add(_elem33);
blockMetaData.setTotalByteSize(rowGroup.getTotal_byte_size()); List<ColumnChunk> columns = rowGroup.getColumns(); String filePath = columns.get(0).getFile_path(); for (ColumnChunk columnChunk : columns) { if ((filePath == null && columnChunk.getFile_path() != null) || (filePath != null && !filePath.equals(columnChunk.getFile_path()))) { throw new ParquetDecodingException("all column chunks of the same row group must be in the same file for now");
public ColumnChunk deepCopy() { return new ColumnChunk(this); }
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; }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetFile_path()) ? 131071 : 524287); if (isSetFile_path()) hashCode = hashCode * 8191 + file_path.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(file_offset); hashCode = hashCode * 8191 + ((isSetMeta_data()) ? 131071 : 524287); if (isSetMeta_data()) hashCode = hashCode * 8191 + meta_data.hashCode(); hashCode = hashCode * 8191 + ((isSetOffset_index_offset()) ? 131071 : 524287); if (isSetOffset_index_offset()) hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(offset_index_offset); hashCode = hashCode * 8191 + ((isSetOffset_index_length()) ? 131071 : 524287); if (isSetOffset_index_length()) hashCode = hashCode * 8191 + offset_index_length; hashCode = hashCode * 8191 + ((isSetColumn_index_offset()) ? 131071 : 524287); if (isSetColumn_index_offset()) hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(column_index_offset); hashCode = hashCode * 8191 + ((isSetColumn_index_length()) ? 131071 : 524287); if (isSetColumn_index_length()) hashCode = hashCode * 8191 + column_index_length; return hashCode; }
for (int _i34 = 0; _i34 < _list32.size; ++_i34) _elem33 = new ColumnChunk(); _elem33.read(iprot); struct.columns.add(_elem33);