[ https://issues.apache.org/jira/browse/HIVE-10698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14564028#comment-14564028 ]
Ashutosh Chauhan commented on HIVE-10698: ----------------------------------------- +1 > query on view results fails with table not found error if view is created > with subquery alias (CTE). > ---------------------------------------------------------------------------------------------------- > > Key: HIVE-10698 > URL: https://issues.apache.org/jira/browse/HIVE-10698 > Project: Hive > Issue Type: Bug > Reporter: Pengcheng Xiong > Assignee: Pengcheng Xiong > Attachments: HIVE-10698.01.patch > > > To reproduce it, > {code} > use bugtest; > create table basetb(id int, name string); > create view testv1 as > with subtb as (select id, name from bugtest.basetb) > select id from subtb; > use castest; > explain select * from bugtest.testv1; > hive> explain select * from bugtest.testv1; > FAILED: SemanticException Line 2:15 Table not found 'subtb' in definition of > VIEW testv1 [ > with subtb as (select id, name from bugtest.basetb) > select id from `bugtest`.`subtb` > ] used as testv1 at Line 1:22 > Note that there is a database prefix `bugtest`.`subtb` > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)