[
https://issues.apache.org/jira/browse/HIVE-4144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14068174#comment-14068174
]
Lefty Leverenz commented on HIVE-4144:
--------------------------------------
This is a function, so documentation will go in the UDF wiki. If I understand
correctly, the function name is current_database() instead of database() as
shown in the jira title.
In addition to the UDF doc, this can be mentioned in other places where USE
db_name is discussed. Currently that would be the "Use Database" and "Create
Table" sections of the DDL doc and the Select doc.
Quick reference (docs not updated yet):
* [Operators and UDFs -- Misc. Functions (or separate section "Current Database
Function") |
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-Misc.Functions]
* [DDL -- Use Database |
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-UseDatabase]
* [DDL -- Create Table |
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable]
* [Select -- Select Syntax |
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select#LanguageManualSelect-SelectSyntax]
> Add "select database()" command to show the current database
> ------------------------------------------------------------
>
> Key: HIVE-4144
> URL: https://issues.apache.org/jira/browse/HIVE-4144
> Project: Hive
> Issue Type: Bug
> Components: SQL
> Reporter: Mark Grover
> Assignee: Navis
> Labels: TODOC13
> Fix For: 0.13.0
>
> Attachments: D9597.5.patch, HIVE-4144.10.patch.txt,
> HIVE-4144.11.patch.txt, HIVE-4144.12.patch.txt, HIVE-4144.13.patch.txt,
> HIVE-4144.14.patch.txt, HIVE-4144.6.patch.txt, HIVE-4144.7.patch.txt,
> HIVE-4144.8.patch.txt, HIVE-4144.9.patch.txt, HIVE-4144.D9597.1.patch,
> HIVE-4144.D9597.2.patch, HIVE-4144.D9597.3.patch, HIVE-4144.D9597.4.patch
>
>
> A recent hive-user mailing list conversation asked about having a command to
> show the current database.
> http://mail-archives.apache.org/mod_mbox/hive-user/201303.mbox/%3CCAMGr+0i+CRY69m3id=DxthmUCWLf0NxpKMCtROb=uauh2va...@mail.gmail.com%3E
> MySQL seems to have a command to do so:
> {code}
> select database();
> {code}
> http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_database
> We should look into having something similar in Hive.
--
This message was sent by Atlassian JIRA
(v6.2#6252)