[
https://issues.apache.org/jira/browse/HIVE-24157?focusedWorklogId=493223&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-493223
]
ASF GitHub Bot logged work on HIVE-24157:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Sep/20 23:39
Start Date: 30/Sep/20 23:39
Worklog Time Spent: 10m
Work Description: jcamachor commented on a change in pull request #1497:
URL: https://github.com/apache/hive/pull/1497#discussion_r497858468
##########
File path: ql/src/test/queries/clientnegative/strict_numeric_to_timestamp.q
##########
@@ -0,0 +1,2 @@
+set hive.strict.timestamp.conversion=true;
+select cast(123 as timestamp);
Review comment:
Maybe a couple with a comparison timestamp and numeric (e.g., `=` or
`<`) which should lead to a cast to double being introduced (yeah, comparison
is effectively done in double) and then the query failing.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 493223)
Time Spent: 50m (was: 40m)
> Strict mode to fail on CAST timestamp <-> numeric
> -------------------------------------------------
>
> Key: HIVE-24157
> URL: https://issues.apache.org/jira/browse/HIVE-24157
> Project: Hive
> Issue Type: Improvement
> Components: SQL
> Reporter: Jesus Camacho Rodriguez
> Assignee: Zoltan Haindrich
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> There is some interest in enforcing that CAST numeric <\-> timestamp is
> disallowed to avoid confusion among users, e.g., SQL standard does not allow
> numeric <\-> timestamp casting, timestamp type is timezone agnostic, etc.
> We should introduce a strict config for timestamp (similar to others before):
> If the config is true, we shall fail while compiling the query with a
> meaningful message.
> To provide similar behavior, Hive has multiple functions that provide clearer
> semantics for numeric to timestamp conversion (and vice versa):
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DateFunctions
--
This message was sent by Atlassian Jira
(v8.3.4#803005)