1

如何从 avro(或其他)编码的 parquet 文件中具体化模式的子集?(没有太多可用的文档)

现在查看源代码,我可能会回答我自己的问题:D

编辑:据此

/**
 * The input format to read a Parquet file.
 *
 * It requires an implementation of {@link ReadSupport} to materialize the records.
 *
 * The requestedSchema will control how the original records get projected by the loader.
 * It must be a subset of the original schema. Only the columns needed to reconstruct the records with the requestedSchema will be scanned.
 *
 * @author Julien Le Dem
 *
 * @param <T> the type of the materialized records
 */

似乎我需要创建一个 Avro 类,其中包含字段的子集(或子类或其他东西)以及相应的对象来去实体化。令人费解。

在我开始试验之前,我会坚持将所有 10 场数据非物质化:D 如果有人想回答这个问题(用一个充实的例子),请继续。

4

0 回答 0