Unify sbe value comparison in unit tests

XMLWordPrintableJSON

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

      Currently comparing sbe tag/value pairs in unit tests is hard, because we must use value::compareValue function that returns a tag/value pair and than we have to assert that tag is NumberInt32 and value is the expected comparison value.

      There are different parts of code that handle it differently:
      Example 1
      Example 2
      Example 3
       
      The goal of this ticket is two implement a simple way to compare two SBE values.
       
      For example: ASSERT_SBE_VALUE_EQ/GT/LT(expectedTag, expectedValue, actualTag, actualValue)
       
      The requirements are:
      1. Use value::compareValue under the hood to ensure correct semantics.
      2. Prints expected and actual values on assertion failure for easy debugging
      3. Can support collation if needed.

            Assignee:
            Unassigned
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: