Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-96626

Refactor: Replace ASSERT_CE_APPROX_EQUAL with ASSERT_APPROX_EQUAL

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization

      ASSERT_CE_APPROX_EQUAL is a thin wrapper on top of ASSERT_APPROX_EQUAL. It converts a CE value to double (via static_cast<double>) before comparing. This is used by previous CEType (defunct) and does not work with new strong type alias CardinalityEstimate any more. All the uses of ASSERT_CE_APPROX_EQUAL already have operands as doubles and we should simply use ASSERT_APPROX_EQUAL.

      Remove ASSERT_CE_APPROX_EQUAL and replace all the call sites with ASSERT_APPROX_EQUAL.

            Assignee:
            matt.olma@mongodb.com Matt Olma
            Reporter:
            chii.huang@mongodb.com Chi-I Huang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: