drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-3868) Cast between binary/varbinary and timestamp should throw user friendly error
Date Wed, 30 Sep 2015 22:06:04 GMT

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

Victoria Markman commented on DRILL-3868:
-----------------------------------------

It should also be fixed (and tested) in places where implicit conversion can take place, like
functions:

{code}
0: jdbc:drill:schema=dfs> select coalesce(c_timestamp, timestamp '2015-09-30 00:00:01')
from imp_t1;
Error: SYSTEM ERROR: IllegalArgumentException: Invalid format: "�")��"
Fragment 0:0
[Error Id: 54b131ac-e3e2-4771-9507-0db9ded68f96 on atsqa4-133.qa.lab:31010] (state=,code=0)
{code}

{code}
0: jdbc:drill:schema=dfs> select isnull(c_timestamp, timestamp '2015-09-30 00:00:01') from
imp_t1;
Error: SYSTEM ERROR: SchemaChangeException: Failure while trying to materialize incoming schema.
 Errors:
Error in expression at index -1.  Error: Missing function implementation: [isnull(VARBINARY-OPTIONAL,
TIMESTAMP-REQUIRED)].  Full expression: --UNKNOWN EXPRESSION--..
Fragment 0:0
[Error Id: 0cf01f38-17d7-4030-b39e-0fa6cac69778 on atsqa4-133.qa.lab:31010] (state=,code=0)
{code}

> Cast between binary/varbinary and timestamp should throw user friendly error 
> -----------------------------------------------------------------------------
>
>                 Key: DRILL-3868
>                 URL: https://issues.apache.org/jira/browse/DRILL-3868
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>    Affects Versions: 1.1.0, 1.2.0
>            Reporter: Victoria Markman
>
> Here is how my parquet file is defined:
> {code}
> [Wed Sep 30 11:44:33 ] # ~/parquet-tools/parquet-schema t1.parquet 
> message schema {
>   optional binary c_varchar (UTF8);
>   optional int32 c_integer;
>   optional int64 c_bigint;
>   optional float c_float;
>   optional double c_double;
>   optional binary c_date (UTF8);
>   optional binary c_time (UTF8);
>   optional int96 c_timestamp;
>   optional boolean c_boolean;
> }
> {code}
> Explicit cast: binary to timestamp
> {code}
> 0: jdbc:drill:schema=dfs> select cast(c_varchar as timestamp) from imp_t1;
> Error: SYSTEM ERROR: IllegalArgumentException: Invalid format: "0000 000000 00000" is
malformed at " 000000 00000"
> Fragment 0:0
> [Error Id: 6e3d61f4-371c-4a37-8060-56c33a289c0a on atsqa4-133.qa.lab:31010] (state=,code=0)
> {code}
> Explicit cast int96 --> converted to varbinary internally --> timestamp
> {code}
> 0: jdbc:drill:schema=dfs> select cast(c_timestamp as timestamp) from imp_t1;
> Error: SYSTEM ERROR: IllegalArgumentException: Invalid format: "�")��"
> Fragment 0:0
> [Error Id: 7c3599e8-8e5f-42d5-948e-96a8706cd801 on atsqa4-133.qa.lab:31010] (state=,code=0)
> {code}
> Implicit cast  binary ---> timestamp: should return user error
> {code}
> 0: jdbc:drill:schema=dfs> select count(*) from imp_t1  where c_varchar = timestamp
'2015-04-30 21:23:22';
> Error: SYSTEM ERROR: IllegalArgumentException: Invalid format: "0000 000000 00000" is
malformed at " 000000 00000"=
> Fragment 0:0
> [Error Id: 3fa3993a-d50f-47d3-a415-03e400396e5e on atsqa4-133.qa.lab:31010] (state=,code=0)
> {code}
> Implicit cast : int96 --> converted to varbinary internally --> timestamp
> {code}
> 0: jdbc:drill:schema=dfs> select count(*) from imp_t1  where c_timestamp = timestamp
'2015-04-30 21:23:22';
> Error: SYSTEM ERROR: IllegalArgumentException: Invalid format: "�")��"
> Fragment 0:0
> [Error Id: ee823a76-7ca8-43be-8ee3-e245aa72d19b on atsqa4-133.qa.lab:31010] (state=,code=0)
> {code}
> Please close it as duplicate if bug is already there - could not find one.



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

Mime
View raw message