Bison rules for $const don't match handwritten parser

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The syntax of $const is different from many other operators: it does not interpret an array as a list of arguments. {$const: [123]} evaluates to a 1-element array, while {$const: 123} evaluates to a number.

      The rule for $const in grammar.yy currently expects START_ARRAY and END_ARRAY, so it rejects {$const: 123}.

      Also, $const should accept arbitrary BSON, as in {$const: {$x: 1}}. The rule for valueFieldname has no case for $x. Actually, this might be a lexer error; I'm not sure.

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            David Percy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: