Bug 1347311

Summary: With clause used in evaluatable subquery in a fully pushed user query is seen as missing temp table
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Andrej Smigala <asmigala>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact: Andrej Smigala <asmigala>
Severity: high Docs Contact:
Priority: high    
Version: 6.3.0CC: aszczucz, blafond, jolee, lfabriko, mbaluch, thauser, vhalbert
Target Milestone: ER5   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-24 11:44:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andrej Smigala 2016-06-16 13:46:44 UTC
A query such as:

WITH qry_0 as /*+ no_inline */ (SELECT e2 AS a1, e1 as str FROM pm1.g1 AS t), qry_1 as /*+ no_inline */ (SELECT 'b' AS a1) select (select a1 || 'a' from qry_1) as x, a1 from qry_0

where the projected scalar subquery cannot be pushed down, but the rest of the query can will result in the with plan for qry_1 not being associated with the parent RelationalPlan and results in an exception that the temporary table cannot be found. This does not occur if the clause is inlined (9.0+).

Comment 2 JBoss JIRA Server 2016-06-27 14:21:16 UTC
Steven Hawkins <shawkins@redhat.com> updated the status of jira TEIID-4273 to Closed