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

Support expression $trim in SBE

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Query Execution
    • Fully Compatible
    • QE 2023-06-26, QE 2023-07-10, QE 2023-07-24
    • 160

      Classic Engine Evaluation Semantics (vs. failing SBE Semantics):

      • If 'input' is nullish, return a null value (SBE - checked in the builtinTrim function)
      • else if 'input' is not null but is a non-string value, throw an error (SBE - throws an error assuming previous condition is validated)
      • else if 'chars' is not provided, trim with default whitespace characters (SBE - trims with default whitespace characters)
      • else if 'chars' is provided and null, return a null value (SBE INCORRECT - treats this as the same as not providing it at all)
      • else if 'chars' is provided and not a string, throw an error (SBE - throws an error)
      • else perform trim on 'input' with 'chars' (SBE - trims with 'chars')

      Fix: Treat null 'chars' as different from no 'chars' given and make sure null 'input' is checking before !isString (completed)

            Assignee:
            prithwish.dan@mongodb.com Prithwish Dan (Inactive)
            Reporter:
            anton.korshunov@mongodb.com Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: