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

Improve error message to inform the user if mappify/kvgen fails due to ClassCastException

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.9.0
    • Functions - Drill
    • None

    Description

      Currently mappify throws a non-user friendly error message when the input map consists of heterogenous value types. The proposal is to improve the error message to inform user about the usage and root cause of the failure in a non-technical dialect.

      Running

      select kvgen(t.m) from ex.json t
      

      over

      ex.json
      {m:{a:1}}
      {m:{b:-1.0}}
      

      throws

      Query failed: Query failed: Failure while running fragment., org.apache.drill.exec.vector.complex.impl.NullableFloat8WriterImpl cannot be cast to org.apache.drill.exec.vector.complex.impl.NullableIntWriterImpl
      

      We should inform the user with an intelligible reason why the query failed instead.

      Attachments

        1. DRILL-2118.1.patch.txt
          1 kB
          Hanifi Gunes
        2. DRILL-2118.2.patch.txt
          15 kB
          Hanifi Gunes
        3. DRILL-2118.3.patch.txt
          19 kB
          Hanifi Gunes

        Issue Links

          Activity

            People

              mehant Mehant Baid
              hgunes Hanifi Gunes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: