需求来源
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 来要求 Impala 使用列的名称来解析 Parquet 中对应的列。该配置从 CDH 5.8 / Impala 2.6 版本开始加入。<