Unify sbe value comparison in unit tests

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • 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 to 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:
            Andrei-Cristian Murică
            Reporter:
            Ivan Fefer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: