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

Error Code:107 Message:'The column prefix 'custsale' does not match with a table name or alias name used in the query - But query is valid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 7.1.1, 7.3
    • 7.1.1
    • Query Engine
    • None

    Description

      I ran into this executing the E2E TPCR Text Metadata Test Script and it can be reproduced by focusing on query #22. A model project set and other necessary artifacts will be attached. The whole error, from SQuirreL, is:

      Error: Error Code:107 Message:Remote org.teiid.core.TeiidProcessingException: Error Code:107 Message:Error Code:107 Message:'The column prefix 'custsale' does not match with a table name or alias name used in the query.' error executing statement(s): [Prepared Values: ['13', '17', '18', '23', '29', '30', '31', 0E-15, '13', '17', '18', '23', '29', '30', '31'] SQL: SELECT TOP 100 v_0.c_0, COUNT AS c_1, SUM(v_0.c_1) AS c_2 FROM (SELECT left(g_0.C_PHONE, 2) AS c_0, g_0.C_ACCTBAL AS c_1 FROM CUSTOMER g_0 WHERE left(g_0.C_PHONE, 2) IN (?, ?, ?, ?, ?, ?, ?) AND g_0.C_ACCTBAL > (SELECT AVG(g_1.C_ACCTBAL) FROM CUSTOMER g_1 WHERE g_1.C_ACCTBAL > ? AND left(g_1.C_PHONE, 2) IN (?, ?, ?, ?, ?, ?, ?)) AND NOT (EXISTS (SELECT g_2.O_ORDERKEY, g_2.O_CUSTKEY, g_2.O_ORDERSTATUS, g_2.O_TOTALPRICE, g_2.O_ORDERDATE, g_2.O_ORDERPRIORITY, g_2.O_CLERK, g_2.O_SHIPPRIORITY, g_2.O_COMMENT FROM ORDERS g_2 WHERE g_2.O_CUSTKEY = g_0.C_CUSTKEY))) v_0 GROUP BY v_0.c_0 ORDER BY custsale.c_0]

      The executed query is: select * from vTpcr.Q22 ORDER BY cntrycode

      Attachments

        1. serverLogSnippet11-23-08.log
          72 kB
        2. TPCR_MPS.zip
          60 kB
        3. TPCR-ds.xml
          2 kB

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            pnittel_jira Paul Nittel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: