Search in sources :

Example 1 with ParquetTableMetadataBase

use of org.apache.drill.exec.store.parquet.Metadata.ParquetTableMetadataBase in project drill by apache.

the class ParquetGroupScan method removeUnneededRowGroups.

private ParquetTableMetadataBase removeUnneededRowGroups(ParquetTableMetadataBase parquetTableMetadata) {
    List<ParquetFileMetadata> newFileMetadataList = Lists.newArrayList();
    for (ParquetFileMetadata file : parquetTableMetadata.getFiles()) {
        if (fileSet.contains(file.getPath())) {
            newFileMetadataList.add(file);
        }
    }
    ParquetTableMetadataBase metadata = parquetTableMetadata.clone();
    metadata.assignFiles(newFileMetadataList);
    return metadata;
}
Also used : ParquetTableMetadataBase(org.apache.drill.exec.store.parquet.Metadata.ParquetTableMetadataBase) ParquetFileMetadata(org.apache.drill.exec.store.parquet.Metadata.ParquetFileMetadata)

Aggregations

ParquetFileMetadata (org.apache.drill.exec.store.parquet.Metadata.ParquetFileMetadata)1 ParquetTableMetadataBase (org.apache.drill.exec.store.parquet.Metadata.ParquetTableMetadataBase)1