hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naveen Gangam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-21252) LazyTimestamp - Use String Equals
Date Wed, 13 Feb 2019 16:11:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-21252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16767357#comment-16767357
] 

Naveen Gangam commented on HIVE-21252:
--------------------------------------

Looks good to me. +1

> LazyTimestamp - Use String Equals
> ---------------------------------
>
>                 Key: HIVE-21252
>                 URL: https://issues.apache.org/jira/browse/HIVE-21252
>             Project: Hive
>          Issue Type: Improvement
>          Components: Serializers/Deserializers
>    Affects Versions: 4.0.0, 3.2.0
>            Reporter: BELUGA BEHR
>            Assignee: BELUGA BEHR
>            Priority: Minor
>         Attachments: HIVE-21252.1.patch
>
>
> {code:java|title=LazyTimestamp.java}
>     if (s.compareTo("NULL") == 0) {
>       isNull = true;
>       logExceptionMessage(bytes, start, length, "TIMESTAMP");
>     }
> {code}
> compareTo generates a number to represent the differences between the two Strings.  It's
faster to simply call "equals" which will simply compare the two String directly and return
a boolean.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message