Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-2987

MongoDB: No rows are returned when a function is used in a where clause

    XMLWordPrintable

Details

    Description

      Teiid will return no rows when a function which is pushed down is used in a where clause.

      These queries should return few rows, but the result is empty:

      Query:

      SELECT intkey, stringnum FROM BQT1.SmallA WHERE concat(stringkey, stringnum) = '7-17' ORDER BY intkey
      

      Generated mongo command:

      {aggregate: "smalla", pipeline: [ { $match: { _m0: "7-17" } }, { $project: { c_0: "$INTKEY", c_1: "$STRINGNUM" } }, { $sort: { c_0: 1 } } ] }
      

      Query:

      select intKey from bqt1.smalla where intKey+intKey >20
      

      Generated mongo command:

      {aggregate: "smalla", pipeline: [ { $match: { _m0: { $gt: 20 } } }, { $project: { _m1: "$INTKEY" } } ] }
      

      Attachments

        Activity

          People

            rhn-engineering-rareddy Ramesh Reddy
            felias_jira Filip Elias (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: