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

Couchbase - Teiid returns empty result if source query fails

    XMLWordPrintable

Details

    Description

      Teiid does not provide any information to the user that query actually failed. Only empty result is returned.

      Currently, issuing query like [1] produces source-specific query with syntax error [2] (result directly from Couchbase [3]). But Teiid returns empty result just like query succeeded with no rows.

      [1] Query
      SELECT BQT1.SmallA.FloatNum FROM BQT1.SmallA WHERE BQT1.SmallA.FloatNum = 7
      
      [2] Source-specific query
      Unable to find source-code formatter for language: plain. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      10:16:09,749 DEBUG [org.teiid.CONNECTOR] (Worker12_QueryProcessorQueue86) TEIID29001 Source-specific Query: SELECT TONUMBER(`$cb_c1_FloatNum`) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_FloatNum` = `$cb_t1`.`FloatNum`TONUMBER() WHERE TONUMBER(`$cb_c1_FloatNum`) = 7.0 AND `$cb_t1`.`type` = 'SmallA'
      
      [3] Couchbase result
      Unable to find source-code formatter for language: plain. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      [
        {
          "code": 3000,
          "msg": "syntax error - at TONUMBER",
          "query_from_user": "SELECT TONUMBER(`$cb_c1_FloatNum`) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_FloatNum` = `$cb_t1`.`FloatNum`TONUMBER() WHERE TONUMBER(`$cb_c1_FloatNum`) = 7.0 AND `$cb_t1`.`type` = 'SmallA'"
        }
      ]
      

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            jdurani Juraj DurĂ¡ni (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: