Hive
  1. Hive
  2. HIVE-2191

Allow optional [inner] on equi-join.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Query Processor
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Allow optional [inner] on equi-join.

      Description

      Lot's of databases including mysql support an optional "inner" keyword to explicitely select an equi-join.
      As shown in the mysql docs: http://dev.mysql.com/doc/refman/5.1/en/join.html
      For completeness/portability we should allow this.

      1. HIVE-2191.1.patch.txt
        1 kB
        Bennie Schut
      2. HIVE-2191.2.patch.txt
        20 kB
        Bennie Schut
      3. HIVE-2191.3.patch.txt
        21 kB
        Bennie Schut

        Issue Links

          Activity

          Hide
          Bennie Schut added a comment -

          Created an alias for inner join.

          Show
          Bennie Schut added a comment - Created an alias for inner join.
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/852/
          -----------------------------------------------------------

          Review request for hive.

          Summary
          -------

          HIVE-2191: Allow optional [inner] on equi-join.

          This addresses bug HIVE-2191.
          https://issues.apache.org/jira/browse/HIVE-2191

          Diffs


          trunk/docs/xdocs/language_manual/joins.xml 1131084
          trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1131084

          Diff: https://reviews.apache.org/r/852/diff

          Testing
          -------

          Thanks,

          Bennie

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/852/ ----------------------------------------------------------- Review request for hive. Summary ------- HIVE-2191 : Allow optional [inner] on equi-join. This addresses bug HIVE-2191 . https://issues.apache.org/jira/browse/HIVE-2191 Diffs trunk/docs/xdocs/language_manual/joins.xml 1131084 trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1131084 Diff: https://reviews.apache.org/r/852/diff Testing ------- Thanks, Bennie
          Hide
          Bennie Schut added a comment -

          https://reviews.apache.org/r/852/

          I wasn't sure if a test should be added for this. I could copy a normal join test but it would add to the total build time, considering it's just an alias to join. But if a test is preferred I don't mind adding it.

          Show
          Bennie Schut added a comment - https://reviews.apache.org/r/852/ I wasn't sure if a test should be added for this. I could copy a normal join test but it would add to the total build time, considering it's just an alias to join. But if a test is preferred I don't mind adding it.
          Hide
          John Sichi added a comment -

          Please add a testcase.

          Show
          John Sichi added a comment - Please add a testcase.
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/852/
          -----------------------------------------------------------

          (Updated 2011-06-25 21:34:41.720584)

          Review request for hive.

          Changes
          -------

          Added a test

          Summary
          -------

          HIVE-2191: Allow optional [inner] on equi-join.

          This addresses bug HIVE-2191.
          https://issues.apache.org/jira/browse/HIVE-2191

          Diffs (updated)


          trunk/docs/xdocs/language_manual/joins.xml 1139355
          trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1139355
          trunk/ql/src/test/queries/clientpositive/innerjoin.q PRE-CREATION
          trunk/ql/src/test/results/clientpositive/innerjoin.q.out PRE-CREATION

          Diff: https://reviews.apache.org/r/852/diff

          Testing
          -------

          Thanks,

          Bennie

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/852/ ----------------------------------------------------------- (Updated 2011-06-25 21:34:41.720584) Review request for hive. Changes ------- Added a test Summary ------- HIVE-2191 : Allow optional [inner] on equi-join. This addresses bug HIVE-2191 . https://issues.apache.org/jira/browse/HIVE-2191 Diffs (updated) trunk/docs/xdocs/language_manual/joins.xml 1139355 trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1139355 trunk/ql/src/test/queries/clientpositive/innerjoin.q PRE-CREATION trunk/ql/src/test/results/clientpositive/innerjoin.q.out PRE-CREATION Diff: https://reviews.apache.org/r/852/diff Testing ------- Thanks, Bennie
          Hide
          Bennie Schut added a comment -

          Added a test.

          Show
          Bennie Schut added a comment - Added a test.
          Hide
          John Sichi added a comment -

          Need an ORDER BY on SELECT to make test deterministic.

          Show
          John Sichi added a comment - Need an ORDER BY on SELECT to make test deterministic.
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/852/
          -----------------------------------------------------------

          (Updated 2011-06-27 10:18:47.688311)

          Review request for hive.

          Changes
          -------

          Added an ORDER BY on SELECT to make test deterministic.

          Summary
          -------

          HIVE-2191: Allow optional [inner] on equi-join.

          This addresses bug HIVE-2191.
          https://issues.apache.org/jira/browse/HIVE-2191

          Diffs (updated)


          trunk/docs/xdocs/language_manual/joins.xml 1139355
          trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1139355
          trunk/ql/src/test/queries/clientpositive/innerjoin.q PRE-CREATION
          trunk/ql/src/test/results/clientpositive/innerjoin.q.out PRE-CREATION

          Diff: https://reviews.apache.org/r/852/diff

          Testing
          -------

          Thanks,

          Bennie

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/852/ ----------------------------------------------------------- (Updated 2011-06-27 10:18:47.688311) Review request for hive. Changes ------- Added an ORDER BY on SELECT to make test deterministic. Summary ------- HIVE-2191 : Allow optional [inner] on equi-join. This addresses bug HIVE-2191 . https://issues.apache.org/jira/browse/HIVE-2191 Diffs (updated) trunk/docs/xdocs/language_manual/joins.xml 1139355 trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1139355 trunk/ql/src/test/queries/clientpositive/innerjoin.q PRE-CREATION trunk/ql/src/test/results/clientpositive/innerjoin.q.out PRE-CREATION Diff: https://reviews.apache.org/r/852/diff Testing ------- Thanks, Bennie
          Hide
          Bennie Schut added a comment -

          Added an ORDER BY on SELECT to make test deterministic.

          Show
          Bennie Schut added a comment - Added an ORDER BY on SELECT to make test deterministic.
          Hide
          John Sichi added a comment -

          +1. Will commit when tests pass. (For future reference, you should put the ORDER BY on the SELECT which does the fetch diffed by the test, not the INSERT. In this case it's OK since it's a SELECT *, which is currently guaranteed to fetch in table order.)

          Show
          John Sichi added a comment - +1. Will commit when tests pass. (For future reference, you should put the ORDER BY on the SELECT which does the fetch diffed by the test, not the INSERT. In this case it's OK since it's a SELECT *, which is currently guaranteed to fetch in table order.)
          Hide
          John Sichi added a comment -

          Committed to trunk. Thanks Bennie!

          Show
          John Sichi added a comment - Committed to trunk. Thanks Bennie!
          Hide
          Hudson added a comment -

          Integrated in Hive-trunk-h0.21 #799 (See https://builds.apache.org/job/Hive-trunk-h0.21/799/)
          HIVE-2191. Allow optional [inner] on equi-join (Bennie Schut via jvs)

          jvs : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1140748
          Files :

          • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
          • /hive/trunk/ql/src/test/results/clientpositive/innerjoin.q.out
          • /hive/trunk/ql/src/test/queries/clientpositive/innerjoin.q
          • /hive/trunk/docs/xdocs/language_manual/joins.xml
          Show
          Hudson added a comment - Integrated in Hive-trunk-h0.21 #799 (See https://builds.apache.org/job/Hive-trunk-h0.21/799/ ) HIVE-2191 . Allow optional [inner] on equi-join (Bennie Schut via jvs) jvs : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1140748 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g /hive/trunk/ql/src/test/results/clientpositive/innerjoin.q.out /hive/trunk/ql/src/test/queries/clientpositive/innerjoin.q /hive/trunk/docs/xdocs/language_manual/joins.xml

            People

            • Assignee:
              Bennie Schut
              Reporter:
              Bennie Schut
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development