需求来源
impala查询
问题描述
Impala查询表报如下异常
nested exception is java.sql.SQLException: File 'hdfs://nameservice/loongshawn/d/table/p_date=2018-01/part-xxxxxxxxxxxx' has an incompatible Parquet schema for column 'v.table.fileed'. Column type: DOUBLE, Parquet schema: optional byte_array f
nested exception is java.sql.SQLException: File ‘hdfs://nameservice/loongshawn/d/table/p_date=2018-01/part-xxxxxxxxxxxx’ has an incompatible Parquet schema for column ‘v.table.fileed’. Column type: DOUBLE, Parquet schema: optional byte_array f
解决方式
- 方式一、操作规范:分区表涉及新增字段,一律在末尾添加,不会错。
- 方式二、set PARQUET_FALLBACK_SCHEMA_RESOLUTION=name1。使用 Impala 查询时设置参数PARQUET_FALLBACK_SCHEMA_RESOLUTION=name 来要求 I

本文档介绍了在使用Impala查询时遇到的'Incompatible Parquet schema'异常,详细分析了问题的原因及解决方案。当在Parquet格式的表中新增字段时,不规范的操作可能导致查询失败。解决方法包括遵循在末尾添加新字段的规范或者通过设置IMPALA的PARQUET_FALLBACK_SCHEMA_RESOLUTION参数来解决。同时,文中也对比了Spark SQL和Impala在处理空字段时的不同行为。
最低0.47元/天 解锁文章

2234

被折叠的 条评论
为什么被折叠?



