Apache-Drill查询镶木地板文件:镶木地板记录读取器中的错误

时间:2018-10-23 14:48:46

标签: parquet apache-drill pyarrow

我已经使用Pyarrow创建了一个实木复合地板文件,可以使用Pyspark查询它。但是,无法使用最近安装的Apache-drill(1.14)来查询它,它可以与其他数据格式一起使用,包括csv,json和RDB。有人可以帮我解决出现的问题以及如何解决吗?谢谢!

(我能够运行count(*)查询,但无法在下面运行查询)

这是我的查询和错误消息:

select * from dfs.`C:/Apache_Spark/sample_Sends_2017.parquet` limit 20;

查询执行失败

原因:

SQL Error: INTERNAL_ERROR ERROR: Error in parquet record reader.
Message: Failure in setting up reader
Parquet Metadata: ParquetMetaData{FileMetaData{schema: message schema {
optional int64 SendsID;
optional int64 SendJobsID;
optional int64 SendID;
optional binary EncryptIndivID (UTF8);
optional int64 SendDate (TIMESTAMP_MICROS);
optional int64 __index_level_0__;
}

, metadata: {pandas={"index_columns": ["__index_level_0__"], "column_indexes": [{"name": null, "field_name": null, "pandas_type": "unicode", "numpy_type": "object", "metadata": {"encoding": "UTF-8"}}], "columns": [{"name": "SendsID", "field_name": "SendsID", "pandas_type": "int64", "numpy_type": "int64", "metadata": null}, {"name": "SendJobsID", "field_name": "SendJobsID", "pandas_type": "int64", "numpy_type": "int64", "metadata": null}, {"name": "SendID", "field_name": "SendID", "pandas_type": "int64", "numpy_type": "int64", "metadata": null}, {"name": "EncryptIndivID", "field_name": "EncryptIndivID", "pandas_type": "unicode", "numpy_type": "object", "metadata": null}, {"name": "SendDate", "field_name": "SendDate", "pandas_type": "datetime", "numpy_type": "datetime64[ns]", "metadata": null}, {"name": null, "field_name": "__index_level_0__", "pandas_type": "int64", "numpy_type": "int64", "metadata": null}], "pandas_version": "0.23.0"}}}, blocks: [BlockMetaData{1000, 46321 [ColumnMetaData{SNAPPY [SendsID] optional int64 SendsID  [PLAIN_DICTIONARY, RLE, PLAIN], 4917}, ColumnMetaData{SNAPPY [SendJobsID] optional int64 SendJobsID  [PLAIN_DICTIONARY, RLE, PLAIN], 6342}, ColumnMetaData{SNAPPY [SendID] optional int64 SendID  [PLAIN_DICTIONARY, RLE, PLAIN], 6568}, ColumnMetaData{SNAPPY [EncryptIndivID] optional binary EncryptIndivID (UTF8)  [PLAIN_DICTIONARY, RLE, PLAIN], 39530}, ColumnMetaData{SNAPPY [SendDate] optional int64 SendDate (TIMESTAMP_MICROS)  [PLAIN_DICTIONARY, RLE, PLAIN], 41195}, ColumnMetaData{SNAPPY [__index_level_0__] optional int64 __index_level_0__  [PLAIN_DICTIONARY, RLE, PLAIN], 45450}]}]}
Fragment 0:0

1 个答案:

答案 0 :(得分:2)

看起来这是一个已知问题DRILL-6670,并在当前的Apache Drill master分支中得到解决。您可以从该分支机构构建Drill,也可以等待即将发布的Drill 1.15.0发行版。

问题在optional int64 SendDate (TIMESTAMP_MICROS)列中。 您可以尝试将其从查询中排除或将其转换为BigInt,有关更多信息,请参见this comment