JDBC连接Phoenix出现Exception in thread “main“ org.apache.phoenix.exception.PhoenixParserException: ERROR

JDBC连接Phoenix出现Exception in thread “main“ org.apache.phoenix.exception.PhoenixParserException: ERROR,第1张

JDBC连接Phoenix出现Exception in thread “main“ org.apache.phoenix.exception.PhoenixParserException: ERROR JDBC连接Phoenix出现Exception in thread “main” org.apache.phoenix.exception.PhoenixParserException: ERROR ERROR 601 (42P00): Syntax error. Encountered

og4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread “main” org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Encountered “test3” at line 1, column 15.
at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)

使用单引号错误,错误是"SELECt * FROM 'test3'"导致的,改成"SELECt * FROM "test3""

需要将单引号改为双引号(' 改为 "),并转义,

# 错误
"SELECt * FROM 'test3'"
# 正确
"SELECt * FROM "test3""

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5693876.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存