[ 
https://issues.apache.org/jira/browse/HIVE-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747659#action_12747659
 ] 

Ning Zhang commented on HIVE-790:
---------------------------------

Another related bug:

-- bug1
select * from (
    select transform(b) using 'cat' as cola from nzhang_tt
  union all
    select transform(c) using 'cat' as cola from nzhang_tt) s;

results:
  NULL
  NULL
  NULL

-- bug2
select * from (
    select b as cola from nzhang_tt
  union all
    select c as cola from nzhang_tt) s;
results:
  NULL
  b
  NULL
  e
  NULL
  i

Data in the table:

select b, c from nzhang_tt;

results: 
  b     c
  e     f
  i     j

This bug may not be only due to race condition between threads. Investigating 
the more generic bug in UNION operator.

> race condition related to ScriptOperator + UnionOperator
> --------------------------------------------------------
>
>                 Key: HIVE-790
>                 URL: https://issues.apache.org/jira/browse/HIVE-790
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Zheng Shao
>            Assignee: Ning Zhang
>
> ScriptOperator uses a second thread to output the rows to the children 
> operators. In a corner case which contains a union, 2 threads might be 
> outputting data into the same operator hierarchy and caused race conditions.
> {code}
> CREATE TABLE tablea (cola STRING);
> SELECT *
> FROM (
>     SELECT TRANSFORM(cola)
>     USING 'cat'
>     AS cola
>     FROM tablea
>   UNION ALL
>     SELECT cola as cola
>     FROM tablea
> ) a;
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to