You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Lefty Leverenz (JIRA)" <ji...@apache.org> on 2016/03/20 09:59:33 UTC

[jira] [Commented] (HIVE-10751) Hive View Specification Needs Update

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

Lefty Leverenz commented on HIVE-10751:
---------------------------------------

[~wzheng], should the "db_name." option also be added to the syntax for ALTER VIEW and DROP VIEW?

* [Drop View | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-DropView]
* [Alter View Properties | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterViewProperties]
* [Alter View As Select | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterViewAsSelect]

> Hive View Specification Needs Update
> ------------------------------------
>
>                 Key: HIVE-10751
>                 URL: https://issues.apache.org/jira/browse/HIVE-10751
>             Project: Hive
>          Issue Type: Task
>          Components: Documentation
>    Affects Versions: 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.13.1
>            Reporter: Tim Gattone
>            Assignee: Wei Zheng
>            Priority: Trivial
>
> On this page: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create/Drop/AlterView
>  
> There is no mention in the spec of the optional [db_name] to qualify the View with, but it is mentioned with CREATE TABLE.
>  
> Isn’t this an oversight?  My understanding is that we can qualify the CREATE VIEW statement with the database such as CREATE VIEW jrnl.sbb_base_v
>  
> The reason I ask is another vendor is questioning this syntax.
>  
> CREATE VIEW [IF NOT EXISTS] view_name [(column_name [COMMENT column_comment], ...) ]
>   [COMMENT view_comment]
>   [TBLPROPERTIES (property_name = property_value, ...)]
>   AS SELECT ...;
> =================================================
> Email response from Hortonworks:
> Subject: Hive - Question
>  
> Good morning Tim, 
>  
> I have received this email thread from Doug. I have looked into it below are my findings. 
>  
> Yes. We can qualify the CREATE VIEW statement with the database. 
>  
> hive> create view db1.vw3 as select * from default.x1;
> OK
> Time taken: 0.084 seconds
> hive>
>  
> This could be a possible documentation issue or improvement, which can be addressed by raising an Apache JIRA. This documentation is maintained by apache and HWX contributes to it. Anyone can register and raise Apache JIRA.  
>  
> Please let me know if you have any questions or concerns.                       
>  
> Thank you,
> Sai



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)