Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-712

Text metadata - transformation SQL editor fails to parse text with reserved word enclosed in quotation marks - no escape mechanism

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.1.1
    • Fix Version/s: 7.1.1
    • Component/s: Transformations
    • Labels:
      None
    • Environment:

      JBDS 4.0.0 Beta 1, Fedora 12

      Description

      I'm executing the TPCR Text metadata test and ran into the word "value" which is being used as a column name. Since it's reserved, it needs to be enclosed in quotes. Now, as part of a text metadata import, it's already a quoted string, so I need to somehow escape the quotation marks around value.

      \" and "" both failed to work. The metadata text is:
      Q11, "SELECT PS_PARTKEY, SUM((PS_SUPPLYCOST * PS_AVAILQTY)) AS value FROM TPCR.PARTSUPP, TPCR.SUPPLIER, TPCR.NATION WHERE (PS_SUPPKEY = S_SUPPKEY) AND (S_NATIONKEY = N_NATIONKEY) AND (N_NAME = 'GERMANY') GROUP BY PS_PARTKEY HAVING SUM((PS_SUPPLYCOST * PS_AVAILQTY)) > (SELECT (SUM((PS_SUPPLYCOST * PS_AVAILQTY)) * 1.0E-4) FROM TPCR.PARTSUPP, TPCR.SUPPLIER, TPCR.NATION WHERE (PS_SUPPKEY = S_SUPPKEY) AND (S_NATIONKEY = N_NATIONKEY) AND (N_NAME = 'GERMANY'))", "TPCR Query 11"

      The importer and/or parser should take into account the need to escape quotes.

        Gliffy Diagrams

          Attachments

          1. EscapeQuotes.zip
            23 kB
          2. TPCR_ViewTransformations.txt
            11 kB
          3. TpcrQueries.txt
            1 kB
          4. VirtualTableRowObject.patch
            3 kB

            Activity

              People

              • Assignee:
                blafond Barry LaFond
                Reporter:
                pnittel Paul Nittel
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: