Gopal V created HIVE-8930:
-----------------------------
Summary: Vector coalesce operators should push down casts
Key: HIVE-8930
URL: https://issues.apache.org/jira/browse/HIVE-8930
Project: Hive
Issue Type: Bug
Components: Vectorization
Affects Versions: 0.13.1, 0.14.0
Reporter: Gopal V
Assignee: Jitendra Nath Pandey
{code}
set hive.vectorized.execution.enabled=true;
create temporary table xx (call_duration string, call_type string) stored as
orc;
insert into table xx values (null, "X"), ("0", "X"), ("1", "X"), (null, "y");
SELECT
ROUND(sum(cast(COALESCE(call_duration, 0) as int))/60, 2) as SwitchMOU
from xx
GROUP BY call_type;
{code}
triggers the wrong cast, which results in a NULL, since the coalesce() has no
resolved return type - it is either a STRING or an INT.
{code}
0.02
NULL
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)