You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/06/03 17:49:00 UTC

[jira] [Work logged] (HIVE-26289) Remove useless try catch in DataWritableReadSupport#getWriterDateProleptic

     [ https://issues.apache.org/jira/browse/HIVE-26289?focusedWorklogId=778234&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-778234 ]

ASF GitHub Bot logged work on HIVE-26289:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Jun/22 17:48
            Start Date: 03/Jun/22 17:48
    Worklog Time Spent: 10m 
      Work Description: achennagiri commented on code in PR #3341:
URL: https://github.com/apache/hive/pull/3341#discussion_r889199970


##########
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/read/DataWritableReadSupport.java:
##########
@@ -278,15 +278,7 @@ public static Boolean getWriterDateProleptic(Map<String, String> metadata) {
       return null;
     }
     String value = metadata.get(DataWritableWriteSupport.WRITER_DATE_PROLEPTIC);

Review Comment:
   I don't really understand the code fully but it looks like
    `String value = metadata.get(DataWritableWriteSupport.WRITER_DATE_PROLEPTIC);` should have been inside the try catch block right?





Issue Time Tracking
-------------------

            Worklog Id:     (was: 778234)
    Remaining Estimate: 0h
            Time Spent: 10m

> Remove useless try catch in DataWritableReadSupport#getWriterDateProleptic
> --------------------------------------------------------------------------
>
>                 Key: HIVE-26289
>                 URL: https://issues.apache.org/jira/browse/HIVE-26289
>             Project: Hive
>          Issue Type: Task
>          Components: HiveServer2
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Trivial
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:java}
>     try {
>       if (value != null) {
>         return Boolean.valueOf(value);
>       }
>     } catch (DateTimeException e) {
>       throw new RuntimeException("Can't parse writer proleptic property stored in file metadata", e);
>     }
> {code}
> The Boolean.valueOf never throws so try catch block is completely useless.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)