hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Chang (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-2509) Literal bigint
Date Thu, 20 Oct 2011 00:15:12 GMT

    [ https://issues.apache.org/jira/browse/HIVE-2509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131201#comment-13131201
] 

Jonathan Chang commented on HIVE-2509:
--------------------------------------

1.) You can't cast array<int> to array<bigint> in Hive which is why we had to
write an FB UDF for this exact problem.  Right now you need to pass in an instance of the
desired type which is annoying with BIGINTs.  This starts to become a deep rabbit hole.  For
example, how do you tell if an array is equal to [0L]?  Turns out you can't compare arrays
in Hive.  So we have a UDF, which chokes if you try to compare array<int> to array<bigint>,
which is IMO reasonable behavior because the complexity/corner cases which we've been talking
about here (and on point #2) just gets moved into this UDF which is untenable for the large
library of UDFs we have.  

2.) Yes, I agree that an error would be good in those cases.  Can we make that happen? (Unrelated
issue but type widening still fails with NULLs; in general I think type widening is uber complicated
and prone to all sorts of issues we wouldn't have if we were more type safe throughout.)
                
> Literal bigint
> --------------
>
>                 Key: HIVE-2509
>                 URL: https://issues.apache.org/jira/browse/HIVE-2509
>             Project: Hive
>          Issue Type: New Feature
>            Reporter: Jonathan Chang
>            Assignee: Jonathan Chang
>         Attachments: D15.1.patch, D15.1.patch
>
>
> Typing bigints is a pain because you have to write CAST(0 AS BIGINT).  We should let
people type 0L instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message