Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2753

Implicit cast fails when comparing a double column and a varchar literal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.0.0
    • Functions - Drill
    • None

    Description

      Query fails when an implicit cast is used between a column of double data type and a double literal.

      Drill:

      > 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)
      

      Postgres:

      # 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)
      

      Attachments

        1. DRILL-2753.patch
          2 kB
          Mehant Baid

        Activity

          People

            mehant Mehant Baid
            agirish Abhishek Girish
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: