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

MongoDB: Usage of function "mod()" in SQL query throws an exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.8, 8.7.1
    • 8.4.1
    • Misc. Connectors
    • None

    Description

      Exception[1] is thrown when function modulo(mod) is used in SQL query.

      Sample query:
      SELECT LongNum, 11, MOD(LongNum, 11) FROM BQT1.SmallA ORDER BY LONGNUM

      Server log is in the attachment.

      [1] 16:36:59,645 ERROR [org.teiid.CONNECTOR] (Worker10_QueryProcessorQueue71) Connector worker process failed for atomic-request=hRCP8hHjrmZb.25.0.13: com.mongodb.CommandFailureException:

      { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: disallowed field type Array in object expression (at 'mod')" , "code" : 15992 , "ok" : 0.0}

      at com.mongodb.CommandResult.getException(CommandResult.java:71)
      at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
      at com.mongodb.DBCollection.aggregate(DBCollection.java:1308)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: