-
Bug
-
Resolution: Done
-
Blocker
-
15.0.1
-
None
-
-
Undefined
When running the following query:
SELECT * FROM ( SELECT email.campaign AS channel_id FROM test_dwh_pg.email_campaigns AS email ,TABLE ( call procs.campaign_to_subchannel1 () ) email_channels UNION ALL SELECT shop.channel_id AS channel_hash FROM test_dwh_pg.for_view AS shop UNION ALL SELECT medium as channel_id FROM "test_dwh_pg.transaction_channel" UNION ALL SELECT md5_hash as channel_id FROM ( SELECT medium AS md5_hash FROM "test_dwh_pg.visits" UNION SELECT medium md5_hash FROM "test_dwh_pg.adcosts" ) tracked_channels ) AS channel_definition
Teiid returns no rows though the test_dwh_pg.visits table contains data in the last union. Once we comment out any union (except first sub-union in the last union) Teiid returns the "xxx" result. For example:
SELECT * FROM ( /*SELECT email.campaign AS channel_id FROM test_dwh_pg.email_campaigns AS email ,TABLE ( call procs.campaign_to_subchannel1 () ) email_channels UNION ALL*/ SELECT shop.channel_id AS channel_hash FROM test_dwh_pg.for_view AS shop UNION ALL SELECT medium as channel_id FROM "test_dwh_pg.transaction_channel" UNION ALL SELECT md5_hash as channel_id FROM ( SELECT medium AS md5_hash FROM "test_dwh_pg.visits" UNION SELECT medium md5_hash FROM "test_dwh_pg.adcosts" ) tracked_channels ) AS channel_definition
will return the correct "xxx" result.
Also if we change "UNION ALL SELECT" just to "UNION SELECT" Teiid will return the correct "xxx" result as well. rhn-engineering-shawkins I know that you're not active anymore on the project but it would be great to fix the bug.