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

Enable implicit casting of VARCHAR and BIT args in aggregate functions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.21.0
    • 1.21.1
    • Functions - Drill
    • None

    Description

      Default function implementations that that throw unsupported operation exceptions in the class AggregateErrorFunctions prevent the implicit casting of VARCHAR and BIT arguments to neighbouring types. E.g.

      apache drill> select sum('1');
      Error: UNSUPPORTED_OPERATION ERROR: Only COUNT, MIN and MAX aggregate functions supported for VarChar type

      This issue proposes to remove AggregateErrorFunctions so that implicit casting works, the example above changing as follows.

      apache drill> select sum('1');
      EXPR$0  1
      1 row selected (2.346 seconds)
      

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: