Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14917

[Server] Valid conversion to Boolean are missing types

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • manual, Server

    Description

      In the documentation, the list of types supporting conversion to boolean does not match the implementation.
      https://docs.mongodb.com/manual/reference/operator/aggregation/convert/
      https://docs.mongodb.com/manual/reference/operator/aggregation/toBool/#mongodb-expression-exp.-toBool

      All missing types except Undefined return true unconditionally :
      https://github.com/10gen/mongo/blob/2fa18e5051b2c3487a9bc5fb8a38a96cdf52dbc0/src/mongo/db/pipeline/expression.cpp#L6129

      Please let me know if you need more details.

      Attachments

        Activity

          People

            Unassigned Unassigned
            natacha.bagnard@mongodb.com Natacha Bagnard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              28 weeks, 5 days ago