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

PrestoDB translator - locate function - source specific function has different order of arguments

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.2, 9.1.3
    • 8.12.8.6_3
    • Misc. Connectors
    • None

      For PrestoDB translator, locate(x,y) is translated as strpos(x,y) - i.e. strpos(substring, string), but function has different order of arguments - from PrestoDB documentation - strpos(string, substring)

      Query
      SELECT StringNum, LOCATE('1', StringNum) FROM BQT1.SmallA
      
      Source-specific command
      SELECT g_0.stringnum, strpos('1', g_0.stringnum) FROM smalla AS g_0
      

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

                Created:
                Updated:
                Resolved: