You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Aihua Xu (JIRA)" <ji...@apache.org> on 2016/11/17 17:40:58 UTC
[jira] [Created] (HIVE-15231) query on view results fails with
table not found error if view is created with subquery alias (CTE).
Aihua Xu created HIVE-15231:
-------------------------------
Summary: query on view results fails with table not found error if view is created with subquery alias (CTE).
Key: HIVE-15231
URL: https://issues.apache.org/jira/browse/HIVE-15231
Project: Hive
Issue Type: Bug
Components: Query Planning
Affects Versions: 1.3.0
Reporter: Aihua Xu
Assignee: Aihua Xu
HIVE-10698 fixed one issue of the query on view with CTE, but it seems to break another case if a alias is given for the CTE.
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 a;
use castest;
explain select * from bugtest.testv1;
hive> explain select * from bugtest.testv1;
FAILED: SemanticException Line 2:21 Table not found 'subtb' in definition of VIEW testv1 [
with subtb as (select `basetb`.`id`, `basetb`.`name` from `bugtest`.`basetb`)
select `a`.`id` from `bugtest`.`subtb` `a`
] used as testv1 at Line 1:14
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)