----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/16900/#review31885 -----------------------------------------------------------
Very useful functionality! Thanks for patch. Looks fine, a couple of minor comments below. ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java <https://reviews.apache.org/r/16900/#comment60653> Should this be defined via HiveConf ? Also would be better to add this in the restrict list so a user can't change it using 'set' command. ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java <https://reviews.apache.org/r/16900/#comment60654> Perhaps this can be cached in SessionState for subsequent queries ? - Prasad Mujumdar On Jan. 15, 2014, 6:22 a.m., Navis Ryu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/16900/ > ----------------------------------------------------------- > > (Updated Jan. 15, 2014, 6:22 a.m.) > > > Review request for hive. > > > Bugs: HIVE-4144 > https://issues.apache.org/jira/browse/HIVE-4144 > > > Repository: hive-git > > > Description > ------- > > 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. > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 96a78fc > ql/src/java/org/apache/hadoop/hive/ql/exec/RowSchema.java 1bfcee6 > ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java 5511bca > ql/src/java/org/apache/hadoop/hive/ql/io/NullRowsInputFormat.java > PRE-CREATION > ql/src/java/org/apache/hadoop/hive/ql/io/OneNullRowInputFormat.java 8ce1c15 > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g cd52e47 > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 52d7c75 > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/UDFCurrentDB.java > PRE-CREATION > ql/src/test/queries/clientpositive/select_dummy_source.q PRE-CREATION > ql/src/test/queries/clientpositive/udf_current_database.q PRE-CREATION > ql/src/test/results/clientnegative/ptf_negative_DistributeByOrderBy.q.out > d73a0fa > ql/src/test/results/clientnegative/ptf_negative_PartitionBySortBy.q.out > 48139f0 > ql/src/test/results/clientnegative/select_udtf_alias.q.out 614a18e > ql/src/test/results/clientpositive/select_dummy_source.q.out PRE-CREATION > ql/src/test/results/clientpositive/show_functions.q.out 57c9036 > ql/src/test/results/clientpositive/udf_current_database.q.out PRE-CREATION > > Diff: https://reviews.apache.org/r/16900/diff/ > > > Testing > ------- > > > Thanks, > > Navis Ryu > >