You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/10/09 00:51:27 UTC

[jira] [Commented] (DRILL-2891) Allowing ROUND function on boolean type can cause all sorts of problems

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

Victoria Markman commented on DRILL-2891:
-----------------------------------------

Now that I think about it, first case is technically data corruption. Raising priority to critical.

> Allowing ROUND function on boolean type can cause all sorts of problems
> -----------------------------------------------------------------------
>
>                 Key: DRILL-2891
>                 URL: https://issues.apache.org/jira/browse/DRILL-2891
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Victoria Markman
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> Works, and I don't think it makes much sense:
> {code}
> 0: jdbc:drill:schema=dfs> select round(c_boolean) from alltypes_with_nulls limit 1;
> +------------+
> |   EXPR$0   |
> +------------+
> | 1          |
> +------------+
> 1 row selected (0.19 seconds)
> {code}
> Fails later if used in other parts of the query.
> In order by:
> {code}
> 0: jdbc:drill:schema=dfs> select round(c_boolean) from alltypes_with_nulls order by 1;
> +------------+
> |   EXPR$0   |
> +------------+
> Query failed: SYSTEM ERROR: java.lang.UnsupportedOperationException: Failure finding function that runtime code generation expected.  Signature: compare_to_nulls_high( TINYINT:OPTIONAL, TINYINT:OPTIONAL ) returns INT:REQUIRED
> Fragment 0:0
> [7add2ed7-de6a-4c66-b511-ecad32413fcc on atsqa4-133.qa.lab:31010]
> java.lang.RuntimeException: java.sql.SQLException: Failure while executing query.
> 	at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2514)
> 	at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148)
> 	at sqlline.SqlLine.print(SqlLine.java:1809)
> 	at sqlline.SqlLine$Commands.execute(SqlLine.java:3766)
> 	at sqlline.SqlLine$Commands.sql(SqlLine.java:3663)
> 	at sqlline.SqlLine.dispatch(SqlLine.java:889)
> 	at sqlline.SqlLine.begin(SqlLine.java:763)
> 	at sqlline.SqlLine.start(SqlLine.java:498)
> 	at sqlline.SqlLine.main(SqlLine.java:460)
> {code}
> In group by
> {code}
> 0: jdbc:drill:schema=dfs> select round(c_boolean) from alltypes group by round(c_boolean);
> Query failed: SYSTEM ERROR: Failure finding function that runtime code generation expected.  Signature: compare_to_nulls_high( TINYINT:REQUIRED, TINYINT:REQUIRED ) returns INT:REQUIRED
> Fragment 0:0
> [286777b2-3395-4e44-94a2-d9dafa07f9dc on atsqa4-133.qa.lab:31010]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> We should not allow that.



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