Hive
  1. Hive
  2. HIVE-6519

Allow optional "as" in subquery definition

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: None
    • Labels:
      None

      Description

      Allow both:
      select * from (select * from foo) bar
      select * from (select * from foo) as bar

      1. HIVE-6519.1.patch
        12 kB
        Gunther Hagleitner

        Activity

        Hide
        Lefty Leverenz added a comment -

        Documented in the wiki here:

        by adding a second line of syntax:

        SELECT ... FROM (subquery) name ...
        SELECT ... FROM (subquery) AS name ...   (Note: Only valid starting with Hive 0.13.0)
        

        and this text:

        The optional keyword "AS" can be included before the subquery name in Hive 0.13.0 and later versions (HIVE-6519).

        Show
        Lefty Leverenz added a comment - Documented in the wiki here: SubQueries: Subqueries in the FROM Clause by adding a second line of syntax: SELECT ... FROM (subquery) name ... SELECT ... FROM (subquery) AS name ... (Note: Only valid starting with Hive 0.13.0) and this text: The optional keyword "AS" can be included before the subquery name in Hive 0.13.0 and later versions ( HIVE-6519 ).
        Hide
        Ashutosh Chauhan added a comment -

        Committed to trunk.

        Show
        Ashutosh Chauhan added a comment - Committed to trunk.
        Hide
        Gunther Hagleitner added a comment -

        Test failures are unrelated...

        Show
        Gunther Hagleitner added a comment - Test failures are unrelated...
        Hide
        Hive QA added a comment -

        Overall: -1 at least one tests failed

        Here are the results of testing the latest attachment:
        https://issues.apache.org/jira/secure/attachment/12631625/HIVE-6519.1.patch

        ERROR: -1 due to 3 failed/errored test(s), 5181 tests executed
        Failed tests:

        org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_auto_sortmerge_join_16
        org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_bucket_num_reducers
        org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_bucketmapjoin6
        

        Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1553/testReport
        Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1553/console

        Messages:

        Executing org.apache.hive.ptest.execution.PrepPhase
        Executing org.apache.hive.ptest.execution.ExecutionPhase
        Executing org.apache.hive.ptest.execution.ReportingPhase
        Tests exited with: TestsFailedException: 3 tests failed
        

        This message is automatically generated.

        ATTACHMENT ID: 12631625

        Show
        Hive QA added a comment - Overall : -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12631625/HIVE-6519.1.patch ERROR: -1 due to 3 failed/errored test(s), 5181 tests executed Failed tests: org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_auto_sortmerge_join_16 org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_bucket_num_reducers org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_bucketmapjoin6 Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1553/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/1553/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 3 tests failed This message is automatically generated. ATTACHMENT ID: 12631625
        Hide
        Ashutosh Chauhan added a comment -

        +1

        Show
        Ashutosh Chauhan added a comment - +1

          People

          • Assignee:
            Gunther Hagleitner
            Reporter:
            Gunther Hagleitner
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development