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

Conversion errors for queries that pass in jstest but fail in QueryTester

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • ALL

      There are a handful of queries that run fine in jstests, but produce conversion errors when run through QueryTester. This ticket would require diagnosing each failure to identify the source of the failure and implementing a fix.

      A shortlist from one run is:

      you cannot pass in a date/time string with time zone information ('Z') together with a timezone argument", code: 241, codeName: "ConversionFailure" }
      can't convert from BSON type string to Date", code: 16006, codeName: "Location16006" }
      $setField requires 'input' to evaluate to type Object", code: 4161105, codeName: "Location4161105" }
      error while multiplanner was selecting best plan :: caused by :: $mergeObjects requires object i...", code: 40400, codeName: "Location40400" }
      $split requires a non-empty separator", code: 40087, codeName: "Location40087" }
      $trim requires its input to be a string, got true (of type bool) instead.", code: 50699, codeName: "Location50699" }
      $regexMatch needs 'input' to be of type string", code: 51104, codeName: "Location51104" }
      can't convert from BSON type regex to String", code: 16007, codeName: "Location16007" }
      only one date allowed in an $add expression", code: 16612, codeName: "Location16612" }
      $concat only supports strings, not object", code: 16702, codeName: "Location16702" }
      $replaceOne requires that 'find' be a string, found: [["vertical Handcrafted Rubber Chair", 2019...", code: 51745, codeName: "Location51745" }
      Value for 'n' must be of integral type, but found null", code: 5787902, codeName: "Location5787902" }
      $zip found a non-array expression in input: "vertical monitor Bedfordshire"", code: 34468, codeName: "Location34468" }
      can't $subtract string from string", code: 14, codeName: "TypeMismatch" }
      error while multiplanner was selecting best plan :: caused by :: $replaceOne requires that 'inpu...", code: 51746, codeName: "Location51746" }
      'n' must be greater than 0, found 0", code: 5787908, codeName: "Location5787908" }
      $replaceOne requires that 'replacement' be a string, found: {type: "Point", coordinates: [124.83...", code: 51744, codeName: "Location51744" }
      date overflow", code: 15, codeName: "Overflow" }
      All operands of $setEquals must be arrays. 2-th argument is of type: string", code: 17044, codeName: "Location17044" }
      $range requires a non-zero step value", code: 34449, codeName: "Location34449" }
      $dateSubtract requires startDate to be convertible to a date", code: 5166403, codeName: "Location5166403" }
      $strLenCP requires a string argument, found: regex", code: 34471, codeName: "Location34471" }
      $trim requires 'chars' to be a string, got 615.9023894881097 (of type decimal) instead.", code: 50700, codeName: "Location50700" }
      $concatArrays only supports arrays, not string", code: 28664, codeName: "Location28664" }
      $dateTrunc requires 'date' to be a date, but got string", code: 5439012, codeName: "Location5439012" }
      $split requires an expression that evaluates to a string as a first argument, found: long", code: 40085, codeName: "Location40085" }
      both operands of $setIsSubset must be arrays. Second argument is of type: string", code: 17042, codeName: "Location17042" }
      input to $filter must be an array not string", code: 28651, codeName: "Location28651" }
      $arrayElemAt's first argument must be an array, but is string", code: 28689, codeName: "Location28689" }
      $split requires an expression that evaluates to a string as a second argument, found: object", code: 40086, codeName: "Location40086" }
      $log's base must be a positive number not equal to 1, but is 1", code: 28759, codeName: "Location28759" }
      $anyElementTrue's argument must be an array, but is string", code: 17041, codeName: "Location17041" }
      $strLenBytes requires a string argument, found: null", code: 34473, codeName: "Location34473" }
      The argument to $size must be an array, but was of type: regex", code: 17124, codeName: "Location17124" }
      The input argument to $sortArray must be an array, but was of type: string", code: 2942504, codeName: "Location2942504" }
      $allElementsTrue's argument must be an array, but is string", code: 17040, codeName: "Location17040" }
      $indexOfCP requires a string as the second argument, found: object", code: 40094, codeName: "Location40094" }
      $in requires an array as a second argument, found: string", code: 40081, codeName: "Location40081" }
      $reduce requires that 'input' be an array, found: "Steel"", code: 40080, codeName: "Location40080" }
      error while multiplanner was selecting best plan :: caused by :: both operands of $setIsSubset m...", code: 17046, codeName: "Location17046" }
      $indexOfBytes requires a string as the first argument, found: int", code: 40091, codeName: "Location40091" }
      $mod only supports numeric types, not string and long", code: 16611, codeName: "Location16611" }
      Input must be an array", code: 5788200, codeName: "Location5788200" }
      invalid dateAdd 'amount' parameter value: -716523511 year", code: 5976500, codeName: "Location5976500" }
      $floor only supports numeric types, not string", code: 28765, codeName: "Location28765" }
      $dateDiff requires 'startDate' to be a date, but got regex", code: 5166307, codeName: "Location5166307" }
      can't $mod by zero", code: 5733415, codeName: "Location5733415" }
      can't $divide by zero", code: 2, codeName: "BadValue" }
      The argument to $reverseArray must be an array, but was of type: decimal", code: 34435, codeName: "Location34435" }
      $indexOfBytes requires a string as the second argument, found: missing", code: 40092, codeName: "Location40092" }
      $switch could not find a matching branch for an input, and no default was specified.", code: 40066, codeName: "Location40066" }
      Can't coerce out of range value nan to long", code: 31109, codeName: "Location31109" }
      $objectToArray requires a document input, found: string", code: 40390, codeName: "Location40390" }
      Could not convert date to string: date component was outside the supported range of 0-9999: 84397", code: 18537, codeName: "Location18537" }
      input to $map must be an array not string", code: 16883, codeName: "Location16883" }
      $indexOfCP requires a string as the first argument, found: long", code: 40093, codeName: "Location40093" }
      both operands of $setIsSubset must be arrays. First argument is of type: string", code: 17310, codeName: "Location17310" }
      can't $mod by zero", code: 16610, codeName: "Location16610" }
      can't take $abs of long long min", code: 28680, codeName: "Location28680" }
      dateAdd overflowed", code: 5166406, codeName: "Location5166406" }
      Generated 500001 documents in $densify, which is over the limit of 500000. Increase the 'interna...", code: 5897900, codeName: "Location5897900" }
      TypeError: arg1.substring is not a function :
      @:1:37
      ", code: 139, codeName: "JSInterpreterFailure" }
      $pow cannot take a base of 0 and a negative exponent", code: 28764, codeName: "Location28764" }
      $trunc only supports numeric types, not object", code: 51081, codeName: "Location51081" }
      Format must be speficied when converting from 'string' to 'binData'", code: 4341115, codeName: "Location4341115" }

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            william.qian@mongodb.com William Qian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: