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

Impala Translator - Mixed Results in Native Function Pushdown

    XMLWordPrintable

Details

    Description

      When running a query, which is referencing an Impala native function, regexp_replace, we are seeing inconsistent results.

      The following example Teiid query returns 0 records:

      SELECT col1 
      FROM TeiidView1
      WHERE impala.regexp_replace(col1, '\047', '') = 'SomeString'

      Looking at the Impala generated query, it is not passing the arguments to the function correctly. The resulting (incorrect and unexpected) Impala query for the above Teiid query is:

      SELECT col1 
      FROM impala_table 
      WHERE regexp_replace(col1,'\\\\047','') = 'SomeString'

      Oddly, while experimenting, if we add the LIMIT clause to the Teiid query the argument pushdown result is correct!

      The following example Teiid query returns records:

      SELECT col1 
      FROM TeiidView1
      WHERE impala.regexp_replace(col1, '\047', '') = 'SomeString'
      LIMIT 100

      Here is the resulting (correct and expected) Impala query for the above example Teiid query with LIMIT clause:

      SELECT col1
      FROM impala_table  
      WHERE regexp_replace(g_1.advertiser_name, '\\047', '') = 'SomeString' 
      LIMIT 100

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            scott.wallace@rakuten.com Scott Wallace (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: