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

Implicit cast not working in the join condition

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=810a204
      Build # 26322

      In the below query there is no type attached to 'donuts.id' but we expect implicit cast to work in this case. Data files referenced are also attached

      create view v1 as select cast(id as int) a, cast(price as double) b from prices;
      select v1.a from v1 inner join donuts on v1.a = donuts.id;

      Error From Sqlline : UnsupportedOperationException:[ Failure finding function that runtime code generation expected. Signature: compare_to( INT:OPTIONALVARCHAR:OPTIONAL, ) returns INT:REQUIRED ]

      With slight modification the below query works

      select v1.a from v1 inner join donuts on v1.a = donuts.id + 1 -1;

      Attachments

        1. donuts.json
          0.1 kB
          Rahul Kumar Challapalli
        2. prices.json
          0.0 kB
          Rahul Kumar Challapalli
        3. DRILL-1125.patch
          9 kB
          Mehant Baid

        Issue Links

          Activity

            People

              DrillCommitter DrillCommitter
              rkins Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: