Anton Gozhiy created DRILL-7285: ----------------------------------- Summary: A temporary table has a higher priority than the cte table with the same name. Key: DRILL-7285 URL: https://issues.apache.org/jira/browse/DRILL-7285 Project: Apache Drill Issue Type: Bug Affects Versions: 1.16.0 Reporter: Anton Gozhiy
*Steps:* # Switch to a workspace: {code:sql} use dfs.tmp {code} # Create a temporary table: {code:sql} create temporary table t as select 'temp table' as a; {code} # Run the following query: {code:sql} with t as (select 'cte' as a) select * from t; {code} *Expected result:* content from the CTE table should be returned: {noformat} +------------+ | a | +------------+ | cte | +------------+ {noformat} *Actual result:* the temporary table content is returned instead: {noformat} +------------+ | a | +------------+ | temp table | +------------+ {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)