You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Abhishek Girish (JIRA)" <ji...@apache.org> on 2015/04/15 00:18:59 UTC
[jira] [Commented] (DRILL-2753) Implicit cast fails when comparing
a double column and a double literal
[ https://issues.apache.org/jira/browse/DRILL-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14495021#comment-14495021 ]
Abhishek Girish commented on DRILL-2753:
----------------------------------------
On Git.Commit.ID: d7e37f4 (April 11):
{code:sql}
> select columns[22] from `store_sales.dat` where columns[22] <>'' and columns[22] = 50.26 limit 4;
Query failed: RemoteRpcException: Failure while running fragment., -779.73 [ 31948536-d4ee-42a3-a0ad-b85acc793b89 on abhi5.qa.lab:31010 ]
[ 31948536-d4ee-42a3-a0ad-b85acc793b89 on abhi5.qa.lab:31010 ]
Error: exception while executing query: Failure while executing query. (state=,code=0)
> select columns[22] from `store_sales.dat` where columns[22] <>'' and columns[22] = '50.26' limit 4;
+------------+
| EXPR$0 |
+------------+
| 50.26 |
| 50.26 |
| 50.26 |
| 50.26 |
+------------+
4 rows selected (1.658 seconds)
> select columns[22] from `store_sales.dat` where columns[22] <>'' and cast(columns[22] as double) = 50.26 limit 4;
+------------+
| EXPR$0 |
+------------+
| 50.26 |
| 50.26 |
| 50.26 |
| 50.26 |
+------------+
4 rows selected (1.893 seconds)
{code}
> Implicit cast fails when comparing a double column and a double literal
> -----------------------------------------------------------------------
>
> Key: DRILL-2753
> URL: https://issues.apache.org/jira/browse/DRILL-2753
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Reporter: Abhishek Girish
> Assignee: Jinfeng Ni
> Priority: Critical
>
> Query fails when an implicit cast is used between a column of double data type and a double literal.
> *Drill:*
> {code:sql}
> > select ss_customer_sk, ss_ticket_number from store_sales where ss_promo_sk = '50' order by ss_promo_sk limit 1;
> +----------------+------------------+
> | ss_customer_sk | ss_ticket_number |
> +----------------+------------------+
> | 53792 | 44 |
> +----------------+------------------+
> 1 row selected (1.045 seconds)
> > select ss_customer_sk, ss_ticket_number from store_sales where ss_wholesale_cost = '38.19' order by ss_promo_sk limit 1;
> Query failed: RemoteRpcException: Failure while running fragment., 38.19 [ d8f86a4f-226a-4e30-bb23-5b20ae5294e0 on abhi7.qa.lab:31010 ]
> [ d8f86a4f-226a-4e30-bb23-5b20ae5294e0 on abhi7.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> *Postgres:*
> {code:sql}
> # select ss_customer_sk, ss_ticket_number from store_sales where ss_wholesale_cost = '38.19' order by ss_promo_sk limit 1;
> ss_customer_sk | ss_ticket_number
> ----------------+------------------
> 44923 | 148425
> (1 row)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)