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

ClassCastException when filter pushdown is used with a bigint or float column and metadata caching.

    XMLWordPrintableJSON

Details

    Description

      This query results in a ClassCastException when filter pushdown is used with metadata caching. The bigint column is being compared with an integer value.

      0: jdbc:drill:zk=10.10.100.186:5181/drill/rho> select count(*) from orders_parts_metadata where bigint_id < 1100;
      Error: SYSTEM ERROR: ClassCastException: java.lang.Integer cannot be cast to java.lang.Long

      To reproduce the problem, put the attached files into a directory. Then create the metadata:

      refresh table metadata dfs.`path_to_directory`;

      For example, if you put the files in /drill/testdata/filter/orders_parts_metadata, then run this sql command

      refresh table metadata dfs.`/drill/testdata/filter/orders_parts_metadata`;

      A similar problem occurs when a float column is being compared with a double value.

      0: jdbc:drill:zk=10.10.100.186:5181/drill/rho> select count(*) from orders_parts_metadata where float_id < 1100.0;
      Error: SYSTEM ERROR: ClassCastException

      Also when a timestamp column is being compared with a string.

      0: jdbc:drill:zk=10.10.100.186:5181/drill/rho> select count(*) from orders_parts_metadata where timestamp_id < '2016-10-13';
      Error: SYSTEM ERROR: ClassCastException: java.lang.Integer cannot be cast to java.lang.Long

      Attachments

        1. 0_0_1.parquet
          211 kB
          Robert Hou
        2. 0_0_2.parquet
          214 kB
          Robert Hou
        3. 0_0_3.parquet
          206 kB
          Robert Hou
        4. 0_0_4.parquet
          111 kB
          Robert Hou
        5. 0_0_5.parquet
          205 kB
          Robert Hou
        6. drill.parquet_metadata
          16 kB
          Robert Hou

        Issue Links

          Activity

            People

              parthc Parth Chandra
              rhou Robert Hou
              Robert Hou Robert Hou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: