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

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

                Author: ASF GitHub Bot
            Created on: 23/Nov/20 10:19
            Start Date: 23/Nov/20 10:19
    Worklog Time Spent: 10m 
      Work Description: pgaref commented on a change in pull request #1650:
URL: https://github.com/apache/hive/pull/1650#discussion_r528596005



##########
File path: 
common/src/test/org/apache/hadoop/hive/common/type/TestTimestampTZ.java
##########
@@ -84,6 +86,18 @@ public void testVariations() {
     TimestampTZUtil.parse("2017-05-08 07:45:00-3:00");
   }
 
+  @Test
+  public void testPerformance() {
+    for (int i = 0; i < 100; i++) {

Review comment:
       I see -- usually we test the correctness with Junit tests and the 
performance sensitive parts with jmh tests (where you could for example test 
and compare the old behaviour with the new) -- check itests->hive-jmh package.
   
   Not critical for this change though




----------------------------------------------------------------
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: 515448)
    Time Spent: 40m  (was: 0.5h)

> performance: Refactor TimestampTZ parsing
> -----------------------------------------
>
>                 Key: HIVE-24353
>                 URL: https://issues.apache.org/jira/browse/HIVE-24353
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Vincenz Priesnitz
>            Assignee: Vincenz Priesnitz
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> I found that for datasets that contain a lot of timestamps (without 
> timezones) hive spends the majority of time in TimestampTZUtil.parse, in 
> particular constructing stractraces for the try-catch blocks. 
> When parsing TimestampTZ we are currently using a fallback chain with several 
> try-catch blocks. For a common timestamp string without a timezone, we 
> currently throw and catch 2 exceptions, and actually parse the string twice. 
> I propose a refactor, that parses the string once and then expresses the 
> fallback chain with queries to the parsed TemporalAccessor. 
>  
> Update: I added a PR that resolves this issue: 
> [https://github.com/apache/hive/pull/1650] 
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to