[teiid-issues] [JBoss JIRA] (TEIID-5829) Impala Translator - Mixed Results in Native Function Pushdown
Scott Wallace (Jira)
issues at jboss.org
Wed Oct 16 13:55:00 EDT 2019
[ https://issues.jboss.org/browse/TEIID-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Wallace updated TEIID-5829:
---------------------------------
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:
{noformat}SELECT col1
FROM TeiidView1
WHERE impala.regexp_replace(col1, '\047', '') = 'SomeString'{noformat}
Looking at the Impala generated query, it is not passing the arguments to the function correctly. The resulting 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 *correct* resulting 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}}
was:
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 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 *correct* resulting 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}}
> Impala Translator - Mixed Results in Native Function Pushdown
> -------------------------------------------------------------
>
> Key: TEIID-5829
> URL: https://issues.jboss.org/browse/TEIID-5829
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.1.1
> Reporter: Scott Wallace
> Assignee: Steven Hawkins
> Priority: Minor
> Labels: Impala_Translator
>
> 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:
> {noformat}SELECT col1
> FROM TeiidView1
> WHERE impala.regexp_replace(col1, '\047', '') = 'SomeString'{noformat}
> Looking at the Impala generated query, it is not passing the arguments to the function correctly. The resulting 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 *correct* resulting 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}}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the teiid-issues
mailing list