> On Jan. 28, 2015, 9:05 p.m., Alexander Pivovarov wrote: > > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCurrentDate.java, > > line 47 > > <https://reviews.apache.org/r/29900/diff/2/?file=825432#file825432line47> > > > > //you can use substring(0, 10) to get date part of the timestamp > > String dtStr = > > SessionState.get().getQueryCurrentTimestamp().toString().substring(0,10); > > dateVal = Date.valueOf(dtStr);
yeah that works too, i'll give that a shot. - Jason ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29900/#review70083 ----------------------------------------------------------- On Jan. 19, 2015, 10:01 p.m., Jason Dere wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29900/ > ----------------------------------------------------------- > > (Updated Jan. 19, 2015, 10:01 p.m.) > > > Review request for hive and Thejas Nair. > > > Bugs: HIVE-5472 > https://issues.apache.org/jira/browse/HIVE-5472 > > > Repository: hive-git > > > Description > ------- > > Add current_date/current_timestamp. The UDFs get the current_date/timestamp > from the SessionState. > > > Diffs > ----- > > common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 25cccd7 > ql/src/java/org/apache/hadoop/hive/ql/Driver.java 0226f28 > ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java d7c4ca7 > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g f412010 > ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g c960a6b > ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java f45b20a > > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCurrentDate.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCurrentTimestamp.java > PRE-CREATION > ql/src/test/queries/clientpositive/current_date_timestamp.q PRE-CREATION > ql/src/test/results/clientpositive/current_date_timestamp.q.out > PRE-CREATION > ql/src/test/results/clientpositive/show_functions.q.out 9ecb0a0 > > Diff: https://reviews.apache.org/r/29900/diff/ > > > Testing > ------- > > qfile test added > > > Thanks, > > Jason Dere > >