[ https://issues.apache.org/jira/browse/HIVE-24353?focusedWorklogId=515053&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-515053 ]
ASF GitHub Bot logged work on HIVE-24353: ----------------------------------------- Author: ASF GitHub Bot Created on: 21/Nov/20 13:46 Start Date: 21/Nov/20 13:46 Worklog Time Spent: 10m Work Description: VPriesnitz commented on a change in pull request #1650: URL: https://github.com/apache/hive/pull/1650#discussion_r528198208 ########## 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: This is to warm up the jvm before measuring; i added a clarifying comment. ---------------------------------------------------------------- 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: 515053) Time Spent: 20m (was: 10m) > 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: 20m > 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)