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

Adding source table with quoted name results in wrong generated SQL statement

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 6.0.0
    • Query Engine
    • None

      Cloned from TEIIDDES-2152:

      1) Created source model with simple table named "My.Quoted.Table" (including quotes
      2) Created simple virtual table and pasted: SELECT * FROM "My.Quoted.Table"
      3) Parser returned a command resulting in the SQL: SELECT * FROM My.Quoted."Table"

      Parser should be able to handle quoted names properly. In this case the SQL should have been valid as is.

      Confirmed that this does go right back to the Teiid parser. To confirm, the following test was included in
      src/test/java/org/teiid/query/parser/TestParser.java

      @Test
      public void testQuotedSQLString() {
          String sql = "SELECT * FROM \"My.Quoted.Table\""; //$NON-NLS-1$
          String expected = "SELECT * FROM \"MY.QUOTED.TABLE\""; //$NON-NLS-1$
          helpTest(sql, expected, null);
      }
      

      Test fails with a comparison error with the parser returning the SQL in item 3 above.

              rhn-engineering-shawkins Steven Hawkins
              parichar@redhat.com Paul Richardson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: