org.apache.phoenix.exception.PhoenixParserException: ERROR 602 (42P00): Syntax error. Missing “EOF” at line 1, column 36.
public class DimUtil {
public static JSonObject readDimFromPhoenix(Connection conn, String tableName, Long id) {
String sql = "select * from " + tableName + "where id=?";
Object[] args = {id.toString()};
//得到查询结果并返回
List list = JdbcUtil.queryList(conn, sql, args, JSONObject.class);
return list.size()==1?list.get(0):new JSonObject();
}
}
错误分析:
错误解决
在where前面加上一个空格即可.


![[Flink错误总结]PhoenixParserException:ERROR 602 (42P00): Syntax error. Missing “EOF“ [Flink错误总结]PhoenixParserException:ERROR 602 (42P00): Syntax error. Missing “EOF“](http://www.mshxw.com/aiimages/31/600367.png)
