You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Denys Kuzmenko (Jira)" <ji...@apache.org> on 2026/10/15 18:57:00 UTC

[jira] [Updated] (HIVE-30189) Vectorized ORDER BY on a struct or VARIANT column with LIMIT fails at operator initialization

     [ https://issues.apache.org/jira/browse/HIVE-30189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Denys Kuzmenko updated HIVE-30189:
----------------------------------
    Description: 
Repro: SELECT id, v FROM t ORDER BY v LIMIT 2, with vectorization on. The plan has a VectorTopNKeyOperator on the
column.
{code}
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unexpected column vector type STRUCT
  at org.apache.hadoop.hive.ql.exec.vector.VectorColumnSetInfo.addKey(VectorColumnSetInfo.java:139)
  at org.apache.hadoop.hive.ql.exec.vector.VectorTopNKeyOperator.initializeOp(VectorTopNKeyOperator.java:97)
{code}
A struct column fails the same way.
Fix idea: Vectorizer.validateTopNKeyOperator rejects non-primitive keys, as GROUP BY key validation does.


> Vectorized ORDER BY on a struct or VARIANT column with LIMIT fails at operator initialization 
> ----------------------------------------------------------------------------------------------
>
>                 Key: HIVE-30189
>                 URL: https://issues.apache.org/jira/browse/HIVE-30189
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Denys Kuzmenko
>            Priority: Major
>
> Repro: SELECT id, v FROM t ORDER BY v LIMIT 2, with vectorization on. The plan has a VectorTopNKeyOperator on the
> column.
> {code}
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unexpected column vector type STRUCT
>   at org.apache.hadoop.hive.ql.exec.vector.VectorColumnSetInfo.addKey(VectorColumnSetInfo.java:139)
>   at org.apache.hadoop.hive.ql.exec.vector.VectorTopNKeyOperator.initializeOp(VectorTopNKeyOperator.java:97)
> {code}
> A struct column fails the same way.
> Fix idea: Vectorizer.validateTopNKeyOperator rejects non-primitive keys, as GROUP BY key validation does.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)