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

Hash join implicit cast fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • 0.6.0
    • None
    • None

    Description

      Join on two columns, where one is int, and the other is bigint, does not return any results when using hash join. Disabling hashjoin gives the expected result.

      In this example, nation_int and nation_big int each contain a single column, but one has int, and the other bigint:

      0: jdbc:drill:> select i.n_nationkey as a, b.n_nationkey as b from nation_int i, nation_bigint b where i.n_nationkey = b.n_nationkey limit 5;
      ----------------------+

      a b

      ----------------------+
      ----------------------+
      No rows selected (0.891 seconds)
      0: jdbc:drill:> alter session set `planner.enable_hashjoin` = false;
      ----------------------+

      ok summary

      ----------------------+

      true planner.enable_hashjoin updated.

      ----------------------+
      1 row selected (0.04 seconds)
      0: jdbc:drill:> select i.n_nationkey as a, b.n_nationkey as b from nation_int i, nation_bigint b where i.n_nationkey = b.n_nationkey limit 5;
      ----------------------+

      a b

      ----------------------+

      0 0
      1 1
      2 2
      3 3
      4 4

      ----------------------+
      5 rows selected (1.275 seconds)

      Attachments

        1. nation_bigint.parquet
          0.3 kB
          Steven Phillips
        2. nation_int.parquet
          0.3 kB
          Steven Phillips

        Issue Links

          Activity

            People

              mehant Mehant Baid
              sphillips Steven Phillips
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: