[
https://issues.apache.org/jira/browse/HIVE-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652192#action_12652192
]
Ashish Thusoo commented on HIVE-65:
-----------------------------------
Actually mysql supports implicit conversions in both directions and that is
what got me thinking that perhaps we should also be supporting both.
http://dev.mysql.com/doc/refman/5.0/en/type-conversion.html
If we go the polymorphism route we would have to be very careful while adding
UDFs. The UDF writers will have to really understand how for implicit
conversion they have to implement functions with different signatures and that
would just make it that much harder for them to write UDFs that can take
advantage of implicit conversion. In fact polymorphism in the comparison
function is the reason why we are hitting this problem in the
first place.
The problem with going both ways is truly the one that caused us a lot of pain
initially. However, that does not get solved by restricting the conversion
possibilities. If for example we have a udf that takes two forms:
a) evaluate(string, string, int)
b) evaluate(int, string, string)
then even if we only allow string to be converted to int and not vice versa we
have an ambiguous match for
evaluate(1, 'abc', 2)
and we would not know which one to pick. This is what I mean by polymorphism
causing these issues. The comparison functions are
polymorphic and they are the ones that lead to the problem of ambiguity.
> Implict conversion from integer to long broken for Dynamic Serde tables
> -----------------------------------------------------------------------
>
> Key: HIVE-65
> URL: https://issues.apache.org/jira/browse/HIVE-65
> Project: Hadoop Hive
> Issue Type: Bug
> Components: Query Processor
> Reporter: Ashish Thusoo
> Assignee: Zheng Shao
>
> For a dynamic serde table that has a bigint column, implict conversion from
> int to bigint seems to be broken. I have not verified this for other tables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.