查询德鲁伊使用sql时出错,如in()

时间:2018-04-27 02:21:01

标签: sql druid

使用下面的SQL查询德鲁伊

SELECT CASE WHEN sale_mode in (1,2,3)  THEN 'a' ELSE 'b' END AS type
FROM "20051001"
WHERE __time>'2018-04-22 00:00:00'

并返回以下错误消息

Bad Request: Unknown exception: Error while applying rule 
DruidQueryRule:SELECT_PROJECT, args [rel#103796215:LogicalProject.NONE.[] 
(input=rel#103796209:Subset#6.NONE.[],type=CASE(OR(=($45, '1'), =($45, '2'), 
=($45, '3')), 'a', 'b')), rel#103796236:DruidQueryRel.NONE.[[]](query= 
{"queryType":"scan","dataSource": 
{"type":"table","name":"20051001"},"intervals": 
{"type":"intervals","intervals":["2018-04-21T16:00:00.001Z/146140482-04- 
24T15:36:27.903Z"]},"virtualColumns" [],"resultFormat":"compactedList","batchSize":20480,"limit":9223372036854775807,"filter":null,"columns":

但是,如果我“将(1,2,3)中的sale_mode”与“(1,2)中的sale_mode”中的情况一起使用,那么它有效,那么如果问题,任何人都对此有所了解呢?

0 个答案:

没有答案