Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-3015

avg() returns incorrect result if first value is not a number

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.6
    • 0.9.8
    • FUN - Functions
    • None

    Description

      avg() function returns incorrect result if it receives a first value of a non-numeric type.

      select value avg(x) from ["a", 1, 2, 3] x;
      

      returns NULL, while it should return 2.

      Attachments

        Issue Links

          Activity

            People

              dlychagin-cb Dmitry Lychagin
              dlychagin-cb Dmitry Lychagin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: