获取错误:
ERROR 203 (22005): Type mismatch. VARCHAR and TIMESTAMP for '2017-08-30 06:21:46.732'
SQLState: 22005
ErrorCode: 203
在使用apache.pheonix
在SQuirrel SQL Client中执行以下查询时select * from USER_T where USR_CRT=cast('2017-08-30 06:21:46.732' AS timestamp)
和USR_CRT类型是TIMESTAMP
答案 0 :(得分:1)
功能TO_TIMESTAMP对我来说就像一个魅力。您的查询将是:
select * from USER_T where USR_CRT = TO_TIMESTAMP('2017-08-30 06:21:46.732')
我使用Phoenix 4.11.0与HBase 1.3.1和Hadoop 2.7.3而非AWS EMR