You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Bharathkrishna Guruvayoor Murali (JIRA)" <ji...@apache.org> on 2018/03/09 20:16:00 UTC
[jira] [Updated] (HIVE-18863) trunc() calls itself trunk() in an
error message
[ https://issues.apache.org/jira/browse/HIVE-18863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bharathkrishna Guruvayoor Murali updated HIVE-18863:
----------------------------------------------------
Attachment: HIVE-18863.1.patch
> trunc() calls itself trunk() in an error message
> ------------------------------------------------
>
> Key: HIVE-18863
> URL: https://issues.apache.org/jira/browse/HIVE-18863
> Project: Hive
> Issue Type: Bug
> Components: UDF
> Reporter: Tim Armstrong
> Assignee: Bharathkrishna Guruvayoor Murali
> Priority: Minor
> Labels: newbie
> Attachments: HIVE-18863.1.patch
>
>
> {noformat}
> > select trunc('millennium', cast('2001-02-16 20:38:40' as timestamp))
> FAILED: SemanticException Line 0:-1 Argument type mismatch ''2001-02-16 20:38:40'': trunk() only takes STRING/CHAR/VARCHAR types as second argument, got TIMESTAMP
> {noformat}
> I saw this on a derivative of Hive 1.1.0 (cdh5.15.0), but the string still seems to be present on master:
> https://github.com/apache/hive/blob/6d890faf22fd1ede3658a5eed097476eab3c67e9/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTrunc.java#L262
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)