When Impala queries, the column type is String but the error is Double (Column type: STRING, Parquet schema: optional double ZXS)

Insert image description here
Solution 1:
Add this temporary environment setting when querying, check the schema information
set PARQUET_FALLBACK_SCHEMA_RESOLUTION=name;

Solution 2:
Rebuild the Hive table based on Parquet field order.

Cause of the problem:
Hive will automatically match whether the columns and schema of Parquet are in the same order as the table creation order, while Impala will only match based on the order by default and will not match field names, resulting in inconsistent data types.

Guess you like

Origin blog.csdn.net/m0_49447718/article/details/120080688