Soumyakanti Das created HIVE-28815:
--------------------------------------
Summary: Primitive common category for String and Boolean returns
null causing NPE
Key: HIVE-28815
URL: https://issues.apache.org/jira/browse/HIVE-28815
Project: Hive
Issue Type: Bug
Components: Hive
Affects Versions: 4.0.1
Reporter: Soumyakanti Das
Assignee: Soumyakanti Das
If we run the following, the second select statement causes an NPE because of
the boolean column.
{noformat}
create table boolarray1(id int, txt string, num int, flag string);
create table boolarray2(id int, txt string, num int, flag boolean);
insert into boolarray1 values
(1, 'one', 5, 'FALSE'),
(2, 'two', 14, 'TRUE'),
(3, NULL, 3, 'FALSE');
insert into boolarray2 values
(1, 'one', 5, 'FALSE'),
(2, 'two', 14, 'TRUE'),
(3, NULL, 3, 'FALSE');
select array(*) from boolarray1;
select array(*) from boolarray2;{noformat}
For the first table, the common category for all four columns is a String. For
the second table, common category for the first three columns is a String, but
when we try to compute common category of String and Boolean we get a null from
[https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java#L1179]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)