欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

iceberg org.apache.iceberg.parquet.Parquet parquet file read

程序员文章站 2022-03-08 08:05:55
...

org.apache.iceberg.parquet.Parquet#read

public static ReadBuilder read(InputFile file) {
    return new ReadBuilder(file);
}

iceberg org.apache.iceberg.parquet.Parquet parquet file read

org.apache.iceberg.parquet.Parquet.ReadBuilder

public static class ReadBuilder {
    // 文件读范围: [start, start + length).
    private Long start = null;
    private Long length = null;
    // 文件所属 table 的 schema
    private Schema schema = null;
    // org.apache.iceberg.expressions.Expressions#alwaysTrue
    private Expression filter = null;
    // reader
    private Function<MessageType, ParquetValueReader<?>> readerFunc = null;
    // 大小写敏感
    private boolean caseSensitive = true;
}

iceberg org.apache.iceberg.parquet.Parquet parquet file read

遍历迭代器

CloseableIterable<T> iter = builder.build();
this.currentIterator = iter.iterator();
while (this.currentIterator.hasNext()) {
    RowData data = this.currentIterator.next();
    res.add(data);
}

 

相关标签: Iceberg iceberg