You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/11/30 07:44:40 UTC

[GitHub] tang45 opened a new issue #6687: Case when do not work when I have 3 "and"s

tang45 opened a new issue #6687: Case when do not work when I have 3 "and"s
URL: https://github.com/apache/incubator-druid/issues/6687
 
 
   I have 2 sql as follow.
   sql 1:
   `SELECT SUM(CASE my_column
   		WHEN 'cond1' THEN 0
   		WHEN 'cond2' THEN 0
   		WHEN 'cond3' THEN 0
   		ELSE my_column
   	END)
   FROM mytable`
   
   sql1 is OK and return right result.
   
   sql2:
   `SELECT SUM(CASE 
   		WHEN (my_column<>'cond1'
   		AND my_column<> 'cond2'
   		AND my_column<>'cond3') THEN my_column
   		ELSE 0
   	END)
   FROM mytable`
   
   sql2 do not work, return "errorMessage":"Error while applying rule DruidQueryRule:SELECT_PROJECT"
   
   I think 2 sql is same meaning, pls help me.
   
   <img width="990" alt="doc" src="https://user-images.githubusercontent.com/6897639/49275624-c8822e00-f4b6-11e8-890c-1eb54bd3f70b.png">
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org