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

ANALYZE TABLE ... REFRESH METADATA fails with FLOAT4 column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.19.0
    • 1.20.0
    • Metadata
    • None

    Description

      For tables with fewer than ~200 rows and a FLOAT4 column there is no bug: the ANALYZE command succeeds and, indeed, this case is exercised by tests in TestMetastoreCommands.java and alltypes_{required,optional}.parquet which both contain a FLOAT4 column.

      But for tables with more than ~200 rows and a FLOAT4 column the ANALYZE command fails with

      ```

      SQL Error: EXECUTION_ERROR ERROR: PojoRecordReader doesn't yet support conversions from the type [class java.lang.Float].

      Failed to setup reader: DynamicPojoRecordReader

      ```

      E.g. you can reproduce the above with

      ```

      create table dfs.tmp.test_analyze as
      select cast(1 as float) from cp.`employee.json`;

      analyze table dfs.tmp.test_analyze refresh metadata;
      ```

      I believe that the bug is easily fixed by adding support for Java.lang.Float to PojoWriters.java.  I do not know why it requires more than ~200 rows for the code path through PojoRecordReader to come into play, and for this bug to manifest.

      Attachments

        Activity

          People

            dzamo James Turton
            dzamo James Turton
            Cong Luo Cong Luo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: