[
https://issues.apache.org/jira/browse/HIVE-30188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Denys Kuzmenko updated HIVE-30188:
----------------------------------
Description:
Repro (vectorization on):
- SELECT id, IF(id IS NOT NULL, v, NULL) FROM t
- SELECT id, CASE WHEN id IS NOT NULL THEN v END FROM t
{code}
Caused by: java.lang.RuntimeException: Not supported
at
org.apache.hadoop.hive.ql.exec.vector.StructColumnVector.copySelected(StructColumnVector.java:181)
at
org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprColumnNull.evaluate(IfExprColumnNull.java:68)
{code}
- A STRUCT<a:INT> column fails the same way.
- Mixed conditions and COALESCE work.
Fix ideas: implement StructColumnVector.copySelected, or have doGetIfExpression
return null (row mode) for a
non-primitive return type.
> Vectorized IF/CASE over a struct or VARIANT column fails at run time when the
> condition is repeating or all true
> ----------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-30188
> URL: https://issues.apache.org/jira/browse/HIVE-30188
> Project: Hive
> Issue Type: Sub-task
> Reporter: Denys Kuzmenko
> Priority: Major
>
> Repro (vectorization on):
> - SELECT id, IF(id IS NOT NULL, v, NULL) FROM t
> - SELECT id, CASE WHEN id IS NOT NULL THEN v END FROM t
> {code}
> Caused by: java.lang.RuntimeException: Not supported
> at
> org.apache.hadoop.hive.ql.exec.vector.StructColumnVector.copySelected(StructColumnVector.java:181)
> at
> org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprColumnNull.evaluate(IfExprColumnNull.java:68)
> {code}
> - A STRUCT<a:INT> column fails the same way.
> - Mixed conditions and COALESCE work.
> Fix ideas: implement StructColumnVector.copySelected, or have
> doGetIfExpression return null (row mode) for a
> non-primitive return type.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)