Fix flakiness in NDV estimation tests

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • ALL
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are two problems that should be addressed by this fix

      • In certain cases, when sample NDV is very close to sample size, we can end up with negative current NDV estimate, which triggers a tassert. The solution to this is to stop iteration when we can tell we are in this scenario (derivative is very small, or the current guess is about to become negative)
      • The NDV assertions in the sampling estimator test are flakey for fields which have many unique values and small sample size. The randomly chosen sample can see a different number of unique values which very much affects the final guess. There are multiple possible solutions to this: relax the assertions, fix the sample seed, etc

            Assignee:
            Hana Pearlman
            Reporter:
            Hana Pearlman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: