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

Push Teiid function LOCATE() to SQL Server

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 8.7.1.6_2
    • Fix Version/s: 8.12.2, 8.13
    • Component/s: JDBC Connector
    • Labels:
      None
    • Environment:

      JBOSS DV 6.2
      Microsoft SQL Server 10.50.1600.1

      Description

      We have some Teiid views with query similar to:
      SELECT col1
      FROM tableA
      WHERE SUBSTRING(col1, 1, LOCATE(' ', col1)) = 'PREFIX'

      SQL Server receives a full scan of col1 table without WHERE:
      SELECT col1
      FROM tableA

      Because Teiid LOCATE() function is not translated to CHARINDEX() SQL Server function (SUBSTRING is translated).

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                jpmat Jean-Pierre Matsumoto
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: