hive Error while compiling statement: FAILED: ClassCastException org.apache.hadoop.hive.serde2.objec

Error while compiling statement: FAILED: ClassCastException org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableConstantStringObjectInspector cannot be cast to org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector
我的情况是where report_month<=substr(add_months(from_unixtime(unix_timestamp(),‘yyyy-MM-dd HH:mm:ss’),-1),1,7) and substr(add_months(from_unixtime(unix_timestamp(),‘yyyy-MM-dd HH:mm:ss’),-6),1,7)
少东西了,我加上report_month>= 然后就正常了。
where report_month<=substr(add_months(from_unixtime(unix_timestamp(),‘yyyy-MM-dd HH:mm:ss’),-1),1,7) and report_month>=substr(add_months(from_unixtime(unix_timestamp(),‘yyyy-MM-dd HH:mm:ss’),-6),1,7)

你可能感兴趣的:(hive,hadoop,apache)