[ 
https://issues.apache.org/jira/browse/HIVE-972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798207#action_12798207
 ] 

John Sichi commented on HIVE-972:
---------------------------------

For error message debuggability, I'm introducting an ASTNodeOrigin concept; 
when we expand a view's definition and splice it into a referencing query, we 
tag each node with information about its origin, so that if we encounter an 
error during semantic analysis, we can provide full context (similar to the .h 
inclusion chain in a C++ compiler error).  It's a bit verbose, but without it, 
debugging could be difficult.  Here's an example:

CREATE TABLE table1 (key int, value int);
CREATE VIEW view1 AS SELECT * FROM table1;
CREATE VIEW view2 AS SELECT * FROM view1 xxx;
ALTER TABLE table1 REPLACE COLUMNS (key int);
SELECT * FROM view2 yyy;
Error in semantic analysis: line 1:32 Invalid Column Reference `value` in 
definition of VIEW view1 [
SELECT `table1`.`key`, `table1`.`value` FROM table1
] used as xxx at line 1:39 in definition of VIEW view2 [
SELECT `xxx`.`key`, `xxx`.`value` FROM view1 xxx
] used as yyy at line 2:14


> support views
> -------------
>
>                 Key: HIVE-972
>                 URL: https://issues.apache.org/jira/browse/HIVE-972
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Metastore, Query Processor
>            Reporter: Namit Jain
>            Assignee: John Sichi
>
> Hive currently does not support views. 
> It would be a very nice feature to have.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to