You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Namit Jain (JIRA)" <ji...@apache.org> on 2008/12/02 01:01:44 UTC

[jira] Created: (HIVE-92) union all has a problem if no embedding select is present

union all has a problem if no embedding select is present
---------------------------------------------------------

                 Key: HIVE-92
                 URL: https://issues.apache.org/jira/browse/HIVE-92
             Project: Hadoop Hive
          Issue Type: Bug
          Components: Query Processor
            Reporter: Namit Jain
            Assignee: Namit Jain



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


does not work.

The code assumes that either it is a join or only one source is present

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


[jira] Updated: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain updated HIVE-92:
---------------------------

    Attachment: patch-union.txt

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Updated: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain updated HIVE-92:
---------------------------

    Attachment: patch1.txt

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Commented: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Raghotham Murthy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654568#action_12654568 ] 

Raghotham Murthy commented on HIVE-92:
--------------------------------------

+1 

looks good. Maybe file another jira to allow subq1 union subq2?

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Commented: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654562#action_12654562 ] 

Namit Jain commented on HIVE-92:
--------------------------------

for now, catch this and throw and error during semantic analysis - this should be supported later

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Commented: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656112#action_12656112 ] 

Zheng Shao commented on HIVE-92:
--------------------------------

Committed revision 724577.
Thanks Namit!


> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.1.txt, patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Updated: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zheng Shao updated HIVE-92:
---------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

HIVE-92. Fixed union all for non-embedded query. (Namit Jain through zshao)

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.1.txt, patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Updated: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain updated HIVE-92:
---------------------------

    Status: Patch Available  (was: Open)

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.1.txt, patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Updated: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain updated HIVE-92:
---------------------------

    Status: Open  (was: Patch Available)

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Commented: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Ashish Thusoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654567#action_12654567 ] 

Ashish Thusoo commented on HIVE-92:
-----------------------------------

Looks good to me. 

I would however fix the error message to say use subquery for union 

instead of union value.

Please file a separate enhancement for the full union fix...

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Commented: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Raghotham Murthy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654624#action_12654624 ] 

Raghotham Murthy commented on HIVE-92:
--------------------------------------

+1

Note to committer: The patch file patch-union.1.txt does not appear as the last file in the attachments.

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.1.txt, patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Commented: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652488#action_12652488 ] 

Namit Jain commented on HIVE-92:
--------------------------------

during semantic analysis phase,  treat

subq1 union subq2 as

select * from (subq1 union subq2) dummysubq




> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Commented: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654621#action_12654621 ] 

Namit Jain commented on HIVE-92:
--------------------------------

Raghu, can you accept again: changed error mesg to not have the column name at the end

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.1.txt, patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Updated: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain updated HIVE-92:
---------------------------

    Status: Patch Available  (was: Open)

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Updated: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain updated HIVE-92:
---------------------------

    Attachment: patch-union.1.txt

> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: patch-union.1.txt, patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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


[jira] Updated: (HIVE-92) union all has a problem if no embedding select is present

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-92:
-------------------------------

    Fix Version/s: 0.3.0
      Description: 
select s2.key as key, s2.value as value from src s2
  UNION  ALL
select s1.key as key, s1.value as value from src s1;


does not work.

The code assumes that either it is a join or only one source is present

  was:

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


does not work.

The code assumes that either it is a join or only one source is present


> union all has a problem if no embedding select is present
> ---------------------------------------------------------
>
>                 Key: HIVE-92
>                 URL: https://issues.apache.org/jira/browse/HIVE-92
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>             Fix For: 0.3.0
>
>         Attachments: patch-union.1.txt, patch-union.txt, patch1.txt
>
>
> select s2.key as key, s2.value as value from src s2
>   UNION  ALL
> select s1.key as key, s1.value as value from src s1;
> does not work.
> The code assumes that either it is a join or only one source is present

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