[ https://issues.apache.org/jira/browse/HIVE-25233?focusedWorklogId=614088&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-614088 ]
ASF GitHub Bot logged work on HIVE-25233: ----------------------------------------- Author: ASF GitHub Bot Created on: 23/Jun/21 15:42 Start Date: 23/Jun/21 15:42 Worklog Time Spent: 10m Work Description: kgyrtkirk commented on a change in pull request #2380: URL: https://github.com/apache/hive/pull/2380#discussion_r657233348 ########## File path: itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java ########## @@ -1098,11 +1098,11 @@ public void testHttpRetryOnServerIdleTimeout() throws Exception { String userName = System.getProperty("user.name"); Connection conn = getConnection(miniHS2.getJdbcURL(testDbName), userName, "password"); Statement stmt = conn.createStatement(); - stmt.execute("select from_unixtime(unix_timestamp())"); + stmt.execute("select from_unixtime(to_unix_timestamp())"); // Sleep for longer than server's idletimeout and execute a query TimeUnit.SECONDS.sleep(10); try { - stmt.execute("select from_unixtime(unix_timestamp())"); + stmt.execute("select from_unixtime(to_unix_timestamp())"); Review comment: this method call looks odd - `to_unix_timestamp` looks like a conversion function ; but without arguments its just odd - I think we should keep `unix_timestamp` as an alias ########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ########## @@ -523,7 +523,6 @@ system.registerGenericUDF("from_utc_timestamp", GenericUDFFromUtcTimestamp.class); system.registerGenericUDF("to_utc_timestamp", GenericUDFToUtcTimestamp.class); - system.registerGenericUDF("unix_timestamp", GenericUDFUnixTimeStamp.class); Review comment: please don't remove this - instead reference the remaining funciton ########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ########## @@ -523,7 +523,6 @@ system.registerGenericUDF("from_utc_timestamp", GenericUDFFromUtcTimestamp.class); system.registerGenericUDF("to_utc_timestamp", GenericUDFToUtcTimestamp.class); - system.registerGenericUDF("unix_timestamp", GenericUDFUnixTimeStamp.class); Review comment: after this you could probably undo some of the unnecessary changes to `to_unix_timestamp` in the tests ########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ########## @@ -523,7 +523,6 @@ system.registerGenericUDF("from_utc_timestamp", GenericUDFFromUtcTimestamp.class); system.registerGenericUDF("to_utc_timestamp", GenericUDFToUtcTimestamp.class); - system.registerGenericUDF("unix_timestamp", GenericUDFUnixTimeStamp.class); system.registerGenericUDF("to_unix_timestamp", GenericUDFToUnixTimeStamp.class); Review comment: instead of keeping `GenericUDFToUnixTimeStamp` I think we should rename `GenericUDFToUnixTimeStamp` to `GenericUDFUnixTimeStamp` ; because that's more logical -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 614088) Time Spent: 1h 10m (was: 1h) > Removing deprecated unix_timestamp UDF > -------------------------------------- > > Key: HIVE-25233 > URL: https://issues.apache.org/jira/browse/HIVE-25233 > Project: Hive > Issue Type: Task > Components: UDF > Affects Versions: All Versions > Reporter: Ashish Sharma > Assignee: Ashish Sharma > Priority: Trivial > Labels: pull-request-available > Time Spent: 1h 10m > Remaining Estimate: 0h > > Description > Since unix_timestamp() UDF was deprecated as part of > https://issues.apache.org/jira/browse/HIVE-10728. Internal > GenericUDFUnixTimeStamp extend GenericUDFToUnixTimeStamp and call > to_utc_timestamp() for unix_timestamp(string date) & unix_timestamp(string > date, string pattern). > unix_timestamp() => CURRENT_TIMESTAMP > unix_timestamp(string date) => to_unix_timestamp() > unix_timestamp(string date, string pattern) => to_unix_timestamp() > We should clean up unix_timestamp() and points to to_unix_timestamp() > -- This message was sent by Atlassian Jira (v8.3.4#803005)