You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/05/12 17:33:00 UTC

[jira] [Work logged] (HIVE-26227) Add support of catalog related statements for Hive ql

     [ https://issues.apache.org/jira/browse/HIVE-26227?focusedWorklogId=769773&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-769773 ]

ASF GitHub Bot logged work on HIVE-26227:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/May/22 17:32
            Start Date: 12/May/22 17:32
    Worklog Time Spent: 10m 
      Work Description: wecharyu opened a new pull request, #3288:
URL: https://github.com/apache/hive/pull/3288

   ### What changes were proposed in this pull request?
    Implement the ddl statements related to catalog, the statements can refer to [HIVE-26227](https://issues.apache.org/jira/browse/HIVE-26227).
   
   
   
   ### Why are the changes needed?
   To support basic ddl operation for catalog through Hive ql.
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducable example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   Yes, we should add these new statements to DDL Document.
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   Add a qtest `catalog.q`, can be test by command:
   ```bash
   mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile=catalog.q
   ```




Issue Time Tracking
-------------------

            Worklog Id:     (was: 769773)
    Remaining Estimate: 0h
            Time Spent: 10m

> Add support of catalog related statements for Hive ql
> -----------------------------------------------------
>
>                 Key: HIVE-26227
>                 URL: https://issues.apache.org/jira/browse/HIVE-26227
>             Project: Hive
>          Issue Type: Task
>          Components: Hive
>            Reporter: Wechar
>            Assignee: Wechar
>            Priority: Minor
>             Fix For: 4.0.0-alpha-2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Catalog concept is proposed to Hive 3.0 to allow different systems to connect to different catalogs in the metastore. But so far we can not query catalog through Hive ql, this task aims to implement the ddl statements related to catalog.
> *Create Catalog*
> {code:sql}
> CREATE CATALOG [IF NOT EXISTS] catalog_name
> LOCATION hdfs_path
> [COMMENT catalog_comment];
> {code}
> LOCATION is required for creating a new catalog now.
> *Alter Catalog*
> {code:sql}
> ALTER CATALOG catalog_name SET LOCATION hdfs_path;
> {code}
> Only location metadata can be altered for catalog.
> *Drop Catalog*
> {code:sql}
> DROP CATALOG [IF EXISTS] catalog_name;
> {code}
> DROP CATALOG is always RESTRICT, which means DROP CATALOG will fail if there are non-default databases in the catalog.
> *Show Catalogs*
> {code:sql}
> SHOW CATALOGS [LIKE 'identifier_with_wildcards'];
> {code}
> SHOW CATALOGS lists all of the catalogs defined in the metastore.
> The optional LIKE clause allows the list of catalogs to be filtered using a regular expression.
> *Describe Catalog*
> {code:sql}
> DESC[RIBE] CATALOG [EXTENDED] cat_name;
> {code}
> DESCRIBE CATALOG shows the name of the catalog, its comment (if one has been set), and its root location on the filesystem.
> EXTENDED also shows the create time.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)