You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Zheng Shao (JIRA)" <ji...@apache.org> on 2009/02/03 01:43:59 UTC

[jira] Commented: (HIVE-261) union all query hangs

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

Zheng Shao commented on HIVE-261:
---------------------------------

{code}
sed 's@msgs.push("\(.*\)");@System.out.println("msgs size=" + msgs.size() + " \1"); msgs.push("\1");@g' ./ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
{code}

It seems there is a missing pop or something:

{code}
    [junit] msgs size=1756954 selection target
    [junit] msgs size=1756955 select expression
    [junit] msgs size=1756956 expression specification
    [junit] msgs size=1756957 function specification
    [junit] msgs size=1756958 function name
    [junit] msgs size=1756959 table column identifier
    [junit] msgs size=1756960 table column identifier
    [junit] msgs size=1756961 function specification
    [junit] msgs size=1756962 function name
    [junit] msgs size=1756963 table column identifier
    [junit] msgs size=1756964 table column identifier
    [junit] msgs size=1756965 function specification
    [junit] msgs size=1756966 function name
    [junit] msgs size=1756967 table column identifier
    [junit] msgs size=1756968 table column identifier
    [junit] msgs size=1756969 expression specification
    [junit] msgs size=1756970 function specification
    [junit] msgs size=1756971 function name
    [junit] msgs size=1756972 table column identifier
    [junit] msgs size=1756973 table column identifier
    [junit] msgs size=1756974 function specification
    [junit] msgs size=1756975 function name
    [junit] msgs size=1756976 table column identifier
    [junit] msgs size=1756977 table column identifier
    [junit] msgs size=1756978 function specification
    [junit] msgs size=1756979 function name
    [junit] msgs size=1756980 table column identifier
    [junit] msgs size=1756981 table column identifier
    [junit] msgs size=1756982 selection target
    [junit] msgs size=1756983 select expression
    [junit] msgs size=1756984 expression specification
    [junit] msgs size=1756985 function specification
    [junit] msgs size=1756986 function name
    [junit] msgs size=1756987 table column identifier
    [junit] msgs size=1756988 table column identifier
    [junit] msgs size=1756989 function specification
    [junit] msgs size=1756990 function name
    [junit] msgs size=1756991 table column identifier
    [junit] msgs size=1756992 table column identifier
    [junit] msgs size=1756993 function specification
    [junit] msgs size=1756994 function name
    [junit] msgs size=1756995 table column identifier
    [junit] msgs size=1756996 table column identifier
    [junit] msgs size=1756997 expression specification
    [junit] msgs size=1756998 function specification
    [junit] msgs size=1756999 function name
    [junit] msgs size=1757000 table column identifier
    [junit] msgs size=1757001 table column identifier
    [junit] msgs size=1757002 function specification
    [junit] msgs size=1757003 function name
    [junit] msgs size=1757004 table column identifier
    [junit] msgs size=1757005 table column identifier
    [junit] msgs size=1757006 function specification
    [junit] msgs size=1757007 function name
    [junit] msgs size=1757008 table column identifier
    [junit] msgs size=1757009 table column identifier
    [junit] msgs size=1757010 select list
    [junit] msgs size=1757011 selection target
    [junit] msgs size=1757012 select expression
{code}


My query:
{code}
explain
  select count(1) FROM (

select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL

select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL

select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL

select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL

select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL
select s1.key as key, s1.value as value from src s1 UNION ALL

select s2.key as key, s2.value as value from src s2) unionsrc;

{code}


> union all query hangs
> ---------------------
>
>                 Key: HIVE-261
>                 URL: https://issues.apache.org/jira/browse/HIVE-261
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Hao Liu
>
> we have this query:
> SELECT a.u, b.id FROM (
>  SELECT a1.u, a1.id as id FROM t_1 a1 WHERE a1.date = '2009-01-01' UNION ALL
>  SELECT a2.u, a2.id as id FROM t_2 a2 WHERE a2.date = '2009-01-01' UNION ALL
>  ...
>  SELECT aN.u, aN.id as id FROM t_N an WHERE aN.date = '2009-01-01'
> ) a 
> JOIN t b ON a.id = b.id WHERE b.date='2009-01-01' 
> GROUP BY a.u, b.id
> When we union more than 20 tables, the query will hang. It looks like something wrong in the compiler.

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