You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Zhiyong Liu (JIRA)" <ji...@apache.org> on 2014/05/30 20:09:03 UTC

[jira] [Commented] (DRILL-871) Drill fails to detect errors in queries

    [ https://issues.apache.org/jira/browse/DRILL-871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14014033#comment-14014033 ] 

Zhiyong Liu commented on DRILL-871:
-----------------------------------

OK, agreed that it is not a syntax error, but it is an error nonetheless.  For your reference, this is how it is handled in Postgres:

zhiyongpostgres=# select o.O_TOTALPRICE, c.C_NAME
zhiyongpostgres-#    from orders o, customer c
zhiyongpostgres-#    where o.C_CUSTKEY = c.C_CUSTKEY and o.O_TOTALPRICE > 400000.00
zhiyongpostgres-#    order by o.O_TOTALPRICE;
ERROR:  column o.c_custkey does not exist
LINE 3:    where o.C_CUSTKEY = c.C_CUSTKEY and o.O_TOTALPRICE > 4000...
                 ^


> Drill fails to detect errors in queries
> ---------------------------------------
>
>                 Key: DRILL-871
>                 URL: https://issues.apache.org/jira/browse/DRILL-871
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Hive
>            Reporter: Zhiyong Liu
>
> Accidentally had a typo in a query, such as
> select o.O_TOTALPRICE, c.C_NAME
>    from orders o, customer c
>    where o.C_CUSTKEY = c.C_CUSTKEY and o.O_TOTALPRICE > 400000.00
>    order by o.O_TOTALPRICE;
> The typo is o.C_CUSTKEY, which should be o.O_CUSTKEY.  Drill executes the query with no error detected:
> 0: jdbc:drill:schema=dfs.TpcHMulti> select o.O_TOTALPRICE, c.C_NAME
> . . . . . . . . . . . . . . . . . >    from orders o, customer c
> . . . . . . . . . . . . . . . . . >    where o.C_CUSTKEY = c.C_CUSTKEY and o.O_TOTALPRICE > 400000.00
> . . . . . . . . . . . . . . . . . >    order by o.O_TOTALPRICE;
> +--+
> |  |
> +--+
> +--+
> No rows selected (1.161 seconds)



--
This message was sent by Atlassian JIRA
(v6.2#6252)