[ https://issues.apache.org/jira/browse/HIVE-8488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14175147#comment-14175147 ]
Ashutosh Chauhan commented on HIVE-8488: ---------------------------------------- One thing to keep in mind is effect of this on join/group-by etc. e.g., {code} create table t1 (a string); create table t2 (b char(500)); create table t3 (c varchar(500)); select * from t1 join t2 on t1.a = t2.b join t3 on t2.b = t3.c; {code} Now, columns should match and generate rows. You may want to check with mysql and/or postgres behavior for this. If this is what we want, you may want to add testcase for this. {code} select a , count (a) from t1 group by a; alter table t1 change column a a char(500); select a , count (a) from t1 group by a; alter table t1 change column a a varchar(500); select a , count (a) from t1 group by a; {code} All of this should return same result. You may want to add tests for these as well. Of course, if column length is > 500, than answers should be different but that would be expected. > hash() doesn't match between string and char/varchar > ---------------------------------------------------- > > Key: HIVE-8488 > URL: https://issues.apache.org/jira/browse/HIVE-8488 > Project: Hive > Issue Type: Bug > Components: UDF > Reporter: Jason Dere > Assignee: Jason Dere > Attachments: HIVE-8488.1.patch > > > {noformat} > hive> select * from tab1; > OK > val_484 val_484 val_484 > hive> select hash(c1), hash(c2), hash(c3) from tab1; > OK > 230901778 1973712113 1973712113 > {noformat} > This may throw off users expecting string/varchar/char types to be fairly > interchangeable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)