Project scenario:
Using hive SQL query
Problem Description:
An error is reported when using * in data query, and the field cannot be found
select a.* from mydb.p_6 a;
Direct error reporting
Error: Error while compiling statement: FAILED: RuntimeException java.lang.RuntimeException: cannot find field (0~0 from [0:day, 1:0, 2:(0~0.1], 3:(0.1~0.2], 4:(0.2~0.3], 5:(0.3~0.4], 6:(0.4~0.5], 7:(0.5~0.6], 8:(0.6~0.7], 9:(0.7~0.8], 10:(0.8~0.9], 11:(0.9~1), 12:1] (state=42000,code=40000)
Cause analysis:
The field “0 ~ 0” cannot be found. When creating the table, the field is named (0 ~ 0.1], which leads to incomplete reading of the field,
Solution:
When creating a table, the field names should be standardized. Try not to bring commas and other symbols. Try to underline English letters and numbers