错误:
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<JSONObject> list = JdbcUtil.queryList(conn, sql, args, JSONObject.class);
return list.size()==1?list.get(0):new JSONObject();
}
}
错误分析:
错误解决
在where前面加上一个空格即可.
|