[ https://issues.apache.org/jira/browse/HIVE-25306?focusedWorklogId=620942&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-620942 ]
ASF GitHub Bot logged work on HIVE-25306: ----------------------------------------- Author: ASF GitHub Bot Created on: 09/Jul/21 11:39 Start Date: 09/Jul/21 11:39 Worklog Time Spent: 10m Work Description: sankarh commented on a change in pull request #2445: URL: https://github.com/apache/hive/pull/2445#discussion_r666676465 ########## File path: ql/src/test/queries/clientpositive/ambiguitycheck.q ########## @@ -32,11 +32,9 @@ select int(1.2) from src limit 1; select bigint(1.34) from src limit 1; select binary('1') from src limit 1; select boolean(1) from src limit 1; -select date('1') from src limit 2; Review comment: Why these queries are removed? ########## File path: ql/src/test/queries/clientpositive/materialized_view_rewrite_in_between.q ########## @@ -12,7 +12,7 @@ create database expr2; use expr2; create table sales(prod_id int, cust_id int, store_id int, sale_date timestamp, qty int, amt double, descr string); insert into sales values -(11,1,101,'12/24/2013',1000,1234.00,'onedummytwo'); +(11,1,101,'2013-12-24',1000,1234.00,'onedummytwo'); Review comment: Is this a change in supported formats? ########## File path: serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java ########## @@ -1254,10 +1257,13 @@ public static Timestamp getTimestampFromString(String s) { s = s.trim(); s = trimNanoTimestamp(s); + if(StringUtils.isEmpty(s)) + return null; + try { return TimestampUtils.stringToTimestamp(s); - } catch (IllegalArgumentException e) { - return null; + } catch (IllegalArgumentException | DateTimeException e) { + throw new IllegalArgumentException("Cannot parse " + s); Review comment: What is the impact of throwing the exception instead of returning null? ########## File path: ql/src/test/queries/clientpositive/type_conversions_1.q ########## @@ -18,9 +18,3 @@ select cast(null as binary) from src limit 1; --- Invalid conversions, should all be null Review comment: Why removed? -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 620942) Time Spent: 1h (was: 50m) > Move Date and Timestamp parsing from ResolverStyle.LENIENT to > ResolverStyle.STRICT > ---------------------------------------------------------------------------------- > > Key: HIVE-25306 > URL: https://issues.apache.org/jira/browse/HIVE-25306 > Project: Hive > Issue Type: Bug > Components: Query Planning, UDF > Reporter: Ashish Sharma > Assignee: Ashish Sharma > Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > Description - > Currently Date.java and Timestamp.java use DateTimeFormatter for parsing to > convert the date/timpstamp from int,string,char etc to Date or Timestamp. > Default DateTimeFormatter which use ResolverStyle.LENIENT which mean date > like "1992-13-12" is converted to "2000-01-12", > Moving DateTimeFormatter which use ResolverStyle.STRICT which mean date like > "1992-13-12" is not be converted instead NULL is return. -- This message was sent by Atlassian Jira (v8.3.4#803005)