执行sql时出现错误 extraneous input ‘;’ expecting EOF near ‘

  • Post author:
  • Post category:其他


原文问题:

调用jdbc执行hive sql时出现错误

Error while compiling statement: FAILED: ParseException line 5:22 extraneous input ‘;’ expecting EOF near ‘<EOF>’

错误原因是因为sql语句中多了分号

执行脚本时需要在sql后面添加分号

但是调用jdbc执行sql语句时,不可以在语句用分号结束


在大数据平台执行hive sql查询时,报错:org.apache.hadoop.hive.ql.parse.ParseException:line 1:249 extraneous input ‘;’ expecting EOF near ‘<EOF>’,把“;”去掉,则问题解决。

参考:

执行sql时出现错误 extraneous input ‘;’ expecting EOF near ‘<EOF>’