[
https://issues.apache.org/jira/browse/DRILL-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14533181#comment-14533181
]
Abhishek Girish edited comment on DRILL-2753 at 5/7/15 6:51 PM:
----------------------------------------------------------------
The original issue was specific to Parquet / Text without views.
*Parquet direct (without views on top):*
{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 |
+----------------+------------------+
| 89796 | 185894 |
+----------------+------------------+
1 row selected (0.767 seconds)
> 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 |
+----------------+------------------+
| 87530 | 166070 |
+----------------+------------------+
1 row selected (0.509 seconds)
{code}
Looks to be resolved. However, the values don't seem to match Postgres. Need to
further analyze.
{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)
# 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}
was (Author: agirish):
The original issue was specific to Parquet / Text without views.
*Parquet direct (without views on top):*
{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 |
+----------------+------------------+
| 89796 | 185894 |
+----------------+------------------+
1 row selected (0.767 seconds)
> 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 |
+----------------+------------------+
| 87530 | 166070 |
+----------------+------------------+
1 row selected (0.509 seconds)
{code}
The values don't seem to match Postgres. Need to further analyze.
{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)
# 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}
> Implicit cast fails when comparing a double column and a varchar literal
> ------------------------------------------------------------------------
>
> Key: DRILL-2753
> URL: https://issues.apache.org/jira/browse/DRILL-2753
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Drill
> Reporter: Abhishek Girish
> Assignee: Mehant Baid
> Priority: Critical
> Fix For: 1.0.0
>
> Attachments: DRILL-2753.patch
>
>
> 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)