You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chris Matta (JIRA)" <ji...@apache.org> on 2015/02/09 18:31:34 UTC

[jira] [Updated] (DRILL-1530) Support for the != operator

     [ https://issues.apache.org/jira/browse/DRILL-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Matta updated DRILL-1530:
-------------------------------
    Description: 
Tableau is using the != (not equal) operator in the bellow query which failed tonight with Drill. This operator isn’t technically ANSI SQL, but almost all DBMS support it, any chance this support would be added?

{code:sql}
SELECT CASE 
           WHEN `twitter_tweets`.`favorite_count` / 1 < 0 
                AND `twitter_tweets`.`favorite_count` / 1 != `twitter_tweets`.`favorite_count` / 1 THEN `twitter_tweets`.`favorite_count` / 1 - 1 
           ELSE `twitter_tweets`.`favorite_count` / 1 
       END AS `Favorite_Count__bin_`, 
       COUNT(`twitter_tweets`.`favorite_count`) AS `cnt_favorite_count_ok` 
FROM `mfs.views`.`twitter_tweets` `twitter_tweets` 
INNER JOIN `mfs.views`.`twitter_users` `twitter_users` ON (`twitter_tweets`.`user_id` = `twitter_users`.`user_id`) 
GROUP BY CASE 
             WHEN `twitter_tweets`.`favorite_count` / 1 < 0 
                  AND `twitter_tweets`.`favorite_count` / 1 != `twitter_tweets`.`favorite_count` / 1 THEN `twitter_tweets`.`favorite_count` / 1 - 1 
             ELSE `twitter_tweets`.`favorite_count` / 1 
         END
{code}

  was:
Tableau is using the != operator in the bellow query which failed tonight with Drill. This operator isn’t technically ANSI SQL, but almost all DBMS support it, any chance this support would be added?

{code:sql}
SELECT CASE 
           WHEN `twitter_tweets`.`favorite_count` / 1 < 0 
                AND `twitter_tweets`.`favorite_count` / 1 != `twitter_tweets`.`favorite_count` / 1 THEN `twitter_tweets`.`favorite_count` / 1 - 1 
           ELSE `twitter_tweets`.`favorite_count` / 1 
       END AS `Favorite_Count__bin_`, 
       COUNT(`twitter_tweets`.`favorite_count`) AS `cnt_favorite_count_ok` 
FROM `mfs.views`.`twitter_tweets` `twitter_tweets` 
INNER JOIN `mfs.views`.`twitter_users` `twitter_users` ON (`twitter_tweets`.`user_id` = `twitter_users`.`user_id`) 
GROUP BY CASE 
             WHEN `twitter_tweets`.`favorite_count` / 1 < 0 
                  AND `twitter_tweets`.`favorite_count` / 1 != `twitter_tweets`.`favorite_count` / 1 THEN `twitter_tweets`.`favorite_count` / 1 - 1 
             ELSE `twitter_tweets`.`favorite_count` / 1 
         END
{code}


> Support for the != operator
> ---------------------------
>
>                 Key: DRILL-1530
>                 URL: https://issues.apache.org/jira/browse/DRILL-1530
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Execution - Relational Operators
>    Affects Versions: 0.6.0
>            Reporter: Chris Matta
>            Priority: Minor
>             Fix For: Future
>
>
> Tableau is using the != (not equal) operator in the bellow query which failed tonight with Drill. This operator isn’t technically ANSI SQL, but almost all DBMS support it, any chance this support would be added?
> {code:sql}
> SELECT CASE 
>            WHEN `twitter_tweets`.`favorite_count` / 1 < 0 
>                 AND `twitter_tweets`.`favorite_count` / 1 != `twitter_tweets`.`favorite_count` / 1 THEN `twitter_tweets`.`favorite_count` / 1 - 1 
>            ELSE `twitter_tweets`.`favorite_count` / 1 
>        END AS `Favorite_Count__bin_`, 
>        COUNT(`twitter_tweets`.`favorite_count`) AS `cnt_favorite_count_ok` 
> FROM `mfs.views`.`twitter_tweets` `twitter_tweets` 
> INNER JOIN `mfs.views`.`twitter_users` `twitter_users` ON (`twitter_tweets`.`user_id` = `twitter_users`.`user_id`) 
> GROUP BY CASE 
>              WHEN `twitter_tweets`.`favorite_count` / 1 < 0 
>                   AND `twitter_tweets`.`favorite_count` / 1 != `twitter_tweets`.`favorite_count` / 1 THEN `twitter_tweets`.`favorite_count` / 1 - 1 
>              ELSE `twitter_tweets`.`favorite_count` / 1 
>          END
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)