[
https://issues.apache.org/jira/browse/HIVE-26290?focusedWorklogId=778400&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-778400
]
ASF GitHub Bot logged work on HIVE-26290:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Jun/22 09:12
Start Date: 04/Jun/22 09:12
Worklog Time Spent: 10m
Work Description: ayushtkn commented on code in PR #3342:
URL: https://github.com/apache/hive/pull/3342#discussion_r889507487
##########
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFromUnixTime.java:
##########
@@ -99,7 +98,6 @@ public void configure(MapredContext context) {
if (context != null) {
String timeZoneStr = HiveConf.getVar(context.getJobConf(),
HiveConf.ConfVars.HIVE_LOCAL_TIME_ZONE);
timeZone = TimestampTZUtil.parseTimeZone(timeZoneStr);
- FORMATTER.withZone(timeZone);
Review Comment:
is it dead only, or the folks did it wrong by not assigning it back to the
FORMATTER?
```
FORMATTER = FORMATTER.withZone(timeZone);
```
Earlier it was modifying the formatter by a setter method
```
formatter.setTimeZone(TimeZone.getTimeZone(timeZone));
```
Issue Time Tracking
-------------------
Worklog Id: (was: 778400)
Time Spent: 20m (was: 10m)
> Remove useless calls to DateTimeFormatter#withZone without assignment
> ---------------------------------------------------------------------
>
> Key: HIVE-26290
> URL: https://issues.apache.org/jira/browse/HIVE-26290
> Project: Hive
> Issue Type: Task
> Components: HiveServer2
> Reporter: Stamatis Zampetakis
> Assignee: Stamatis Zampetakis
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> There are some places in the code calling \{{DateTimeFormatter#withZone}}
> without assigning the result anywhere. This basically makes the call useless
> since the method does not modify the formatter instance but always creates a
> new one.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)