Filter NaN from $percentile/$median window function inputs

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • Fully Compatible
    • v8.3, v8.0, v7.0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      NaN passes the value.numeric() check in WindowFunctionPercentileCommon::add and inserted into boost::container::flat_multiset<double>. NaN violates strict weak ordering (NaN<x and x<NaN are both false), so the multiset's binary-search invariants gets corrupted; subsequent remove() calls can erase the wrong element and downstream getValue/remove either return wrong percentiles or trip tassert 7455904. Filter NaN in add/remove the same way AccuratePercentile::incorporate does for the non-window accumulator.

            Assignee:
            Projjal Chanda
            Reporter:
            Projjal Chanda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: