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

Function coalesce returns an Error when none of the columns in coalesce exist in a parquet file

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.13.0
    • 1.16.0
    • None

    Description

      As Drill is schema-free, COALESCE function is expected to return a result and not error out even if none of the columns being referred to exists in files being queried.

      Here is an example for 2 columns, `unk_col` and `unk_col2`, which do not exist in the parquet files

      select coalesce(unk_col, unk_col2) from dfs.`/tmp/parquetfiles`;
      java.lang.IndexOutOfBoundsException: index (0) must be less than size (0)
      at org.apache.drill.shaded.guava.com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:1196)
      
      Fragment 1:0
      
      [Error Id: 7b9193fb-289b-4fbf-a52a-2b93b01f0cd0 on dkvm2c:31010] (state=,code=0)
      

      Attachments

        Issue Links

          Activity

            People

              bohdan Bohdan Kazydub
              bohdan Bohdan Kazydub
              Vova Vysotskyi Vova Vysotskyi
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: