Refactor canEstimateInterval to reduce repeating code

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • QO 2024-12-09, QO 2024-12-23
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As described in https://github.com/10gen/mongo/pull/29121/files#r1850801241, we should factor out the common part in SBE values and make both canEstimateInterval and estimateIntervalCardinality invoke the same function to avoid repeating code.

      Also

      • includeScalar is unused in canEstimateInterval. This should be removed.
      • canEstimateInterval misses checking reversed interval. This should be addressed too.

            Assignee:
            Chi-I Huang
            Reporter:
            Chi-I Huang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: