drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parth Chandra (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-1895) Improve message where implicit cast fails (e.g. with IN clause)
Date Mon, 06 Apr 2015 20:51:12 GMT

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

Parth Chandra updated DRILL-1895:
---------------------------------
    Fix Version/s:     (was: 1.0.0)
                   1.1.0

> Improve message where implicit cast fails (e.g. with IN clause)
> ---------------------------------------------------------------
>
>                 Key: DRILL-1895
>                 URL: https://issues.apache.org/jira/browse/DRILL-1895
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>    Affects Versions: 0.7.0
>            Reporter: Victoria Markman
>            Priority: Minor
>             Fix For: 1.1.0
>
>
> -- Works, because value in "IN CLAUSE" is a compatible numeric type
> {code}
> 0: jdbc:drill:schema=dfs> select * from cp.`tpch/nation.parquet` where n_regionkey
in (4);
> +-------------+------------+-------------+------------+
> | n_nationkey |   n_name   | n_regionkey | n_comment  |
> +-------------+------------+-------------+------------+
> | 4           | EGYPT      | 4           | y above the carefully unusual theodolites.
final dugouts are quickly across the furiously regular d |
> | 10          | IRAN       | 4           | efully alongside of the slyly final dependencies.
 |
> | 11          | IRAQ       | 4           | nic deposits boost atop the quickly final
requests? quickly regula |
> | 13          | JORDAN     | 4           | ic deposits are blithely about the carefully
regular pa |
> | 20          | SAUDI ARABIA | 4           | ts. silent requests haggle. closely express
packages sleep across the blithely |
> +-------------+------------+-------------+------------+
> 5 rows selected (0.092 seconds)
> {code}
> -- WORKS (trying to convert literal string to numeric and succeeds, because it can be
implicitly converted)
> {code}
> 0: jdbc:drill:schema=dfs> select * from cp.`tpch/nation.parquet` where n_regionkey
in ('4');
> +-------------+------------+-------------+------------+
> | n_nationkey |   n_name   | n_regionkey | n_comment  |
> +-------------+------------+-------------+------------+
> | 4           | EGYPT      | 4           | y above the carefully unusual theodolites.
final dugouts are quickly across the furiously regular d |
> | 10          | IRAN       | 4           | efully alongside of the slyly final dependencies.
 |
> | 11          | IRAQ       | 4           | nic deposits boost atop the quickly final
requests? quickly regula |
> | 13          | JORDAN     | 4           | ic deposits are blithely about the carefully
regular pa |
> | 20          | SAUDI ARABIA | 4           | ts. silent requests haggle. closely express
packages sleep across the blithely |
> +-------------+------------+-------------+------------+
> 5 rows selected (0.073 seconds)
> {code}
> -- FAILS (can't be converted to numeric type)
> {code}
> 0: jdbc:drill:schema=dfs> select * from cp.`tpch/nation.parquet` where n_regionkey
in ('abc');
> Query failed: Query failed: Failure while running fragment., abc [ 4578a64c-75c5-4acf-be8c-28ce0db8623d
on atsqa4-133.qa.lab:31010 ]
> [ 4578a64c-75c5-4acf-be8c-28ce0db8623d on atsqa4-133.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:schema=dfs> select * from cp.`tpch/nation.parquet` where n_regionkey
in ('4');
> +-------------+------------+-------------+------------+
> | n_nationkey |   n_name   | n_regionkey | n_comment  |
> +-------------+------------+-------------+------------+
> | 4           | EGYPT      | 4           | y above the carefully unusual theodolites.
final dugouts are quickly across the furiously regular d |
> | 10          | IRAN       | 4           | efully alongside of the slyly final dependencies.
 |
> | 11          | IRAQ       | 4           | nic deposits boost atop the quickly final
requests? quickly regula |
> | 13          | JORDAN     | 4           | ic deposits are blithely about the carefully
regular pa |
> | 20          | SAUDI ARABIA | 4           | ts. silent requests haggle. closely express
packages sleep across the blithely |
> +-------------+------------+-------------+------------+
> 5 rows selected (0.073 seconds)
> {code}
> It would be really neat to get a descriptive error message.
> Postges example:
> {code}
> postgres=# select * from t1 where c1 in ('abc');
> ERROR:  invalid input syntax for integer: "abc"
> {code}



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

Mime
View raw message