[ https://issues.apache.org/jira/browse/DRILL-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14949304#comment-14949304 ]
Victoria Markman commented on DRILL-1895: ----------------------------------------- Tried with 1.2.0, error is much more descriptive now. However I don't think it should be SYSTEM error, but rather USER error: {code} 0: jdbc:drill:schema=dfs> select * from cp.`tpch/nation.parquet` where n_regionkey in ('abc'); Error: SYSTEM ERROR: NumberFormatException: abc Fragment 0:0 [Error Id: 8f70a9f3-ab15-4c72-8887-14b05ad57752 on atsqa4-133.qa.lab:31010] (state=,code=0) {code} > 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: Future > > > -- 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)