hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt McCline (JIRA)" <>
Subject [jira] [Commented] (HIVE-8474) Vectorized reads of transactional tables fail when not all columns are selected
Date Mon, 20 Oct 2014 00:28:33 GMT


Matt McCline commented on HIVE-8474:

Some background on vectorization.

There are are "shadow" VectorizationContext data structures that track which columns of vectorized
row batches for used by each vectorized operators.

In row-by-row mode an operator can easily form a new row Object Array to correspond to the

However, in Vectorization we mask or project away columns in a VectorizedRowBatch (e.g. VectorFilterOperator)
so the same batch can travel down the operators without being copied.  Or, in the case of
computing new columns, VectorSelectOperator will compute new scratch columns.

So, the VectorizationContext starts as all the table columns for Map or the keys and values
for Reduce and then as we go down the operators new VectorizationContext objects are cloned
and their column and scratch column maps are modified.

So, some operators do not use inputObjInspectors or outputObjInspector.  Others, do use them
when the vector operator unpacks batches into rows to call an row mode operator.

> Vectorized reads of transactional tables fail when not all columns are selected
> -------------------------------------------------------------------------------
>                 Key: HIVE-8474
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions, Vectorization
>    Affects Versions: 0.14.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Critical
>             Fix For: 0.14.0
>         Attachments: HIVE-8474.patch
> {code}
> create table concur_orc_tab(name varchar(50), age int, gpa decimal(3, 2)) clustered by
(age) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true');
> select name, age from concur_orc_tab order by name;
> {code}
> results in
> {code}
> Diagnostic Messages for this Task:
> Error: java.lang.NullPointerException
>         at
>         at
>         at
>         at
>         at
>         at
>         at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.moveToNext(
>         at org.apache.hadoop.mapred.MapTask$
>         at
>         at org.apache.hadoop.mapred.MapTask.runOldMapper(
>         at
>         at org.apache.hadoop.mapred.YarnChild$
>         at Method)
>         at
>         at
>         at org.apache.hadoop.mapred.YarnChild.main(
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hive.ql.exec.vector.VectorizedBatchUtil.setNullColIsNullValue(
>         at org.apache.hadoop.hive.ql.exec.vector.VectorizedBatchUtil.addRowToBatchFrom(
>         at org.apache.hadoop.hive.ql.exec.vector.VectorizedBatchUtil.addRowToBatch(
>         at
>         at
>         at
>         ... 13 more
> {code}
> The issue is that the object inspector passed to VectorizedOrcAcidRowReader has all of
the columns in the file rather than only the projected columns.

This message was sent by Atlassian JIRA

View raw message