Hive
  1. Hive
  2. HIVE-3261

alter the number of buckets for a non-empty partitioned table should not be allowed

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Query Processor
    • Labels:

      Description

      This is dangerous since the code uses the table metadata everywhere to get the number of buckets

        Issue Links

          Activity

          Show
          Namit Jain added a comment - https://reviews.facebook.net/D4143
          Hide
          Kevin Wilfong added a comment -

          This seems ok for now, but could you file a follow up task to use partition metadata instead of table metadata wherever bucketing information is used, and mention that the error message added by this JIRA can be removed once that is done.

          One small comment on the diff.

          Show
          Kevin Wilfong added a comment - This seems ok for now, but could you file a follow up task to use partition metadata instead of table metadata wherever bucketing information is used, and mention that the error message added by this JIRA can be removed once that is done. One small comment on the diff.
          Hide
          Carl Steinbach added a comment -

          @Namit: I also added a small comment on phabricator. Thanks.

          Show
          Carl Steinbach added a comment - @Namit: I also added a small comment on phabricator. Thanks.
          Hide
          Namit Jain added a comment -

          comments addressed

          Show
          Namit Jain added a comment - comments addressed
          Hide
          Kevin Wilfong added a comment -

          +1 running tests

          Show
          Kevin Wilfong added a comment - +1 running tests
          Hide
          Kevin Wilfong added a comment -

          Saw some test failures, e.g. TestCliDriver bucket_groupby.q

          Show
          Kevin Wilfong added a comment - Saw some test failures, e.g. TestCliDriver bucket_groupby.q
          Hide
          Namit Jain added a comment -

          The tests have been fixed

          Show
          Namit Jain added a comment - The tests have been fixed
          Hide
          Kevin Wilfong added a comment -

          Committed, thanks Namit.

          Show
          Kevin Wilfong added a comment - Committed, thanks Namit.
          Hide
          Hudson added a comment -

          Integrated in Hive-trunk-h0.21 #1562 (See https://builds.apache.org/job/Hive-trunk-h0.21/1562/)
          HIVE-3261. alter the number of buckets for a non-empty partitioned table should not be allowed. (njain via kevinwilfong) (Revision 1364815)

          Result = FAILURE
          kevinwilfong : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1364815
          Files :

          • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
          • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
          • /hive/trunk/ql/src/test/queries/clientnegative/alter_numbuckets_partitioned_table.q
          • /hive/trunk/ql/src/test/queries/clientpositive/bucket_groupby.q
          • /hive/trunk/ql/src/test/queries/clientpositive/exim_04_evolved_parts.q
          • /hive/trunk/ql/src/test/results/clientnegative/alter_numbuckets_partitioned_table.q.out
          • /hive/trunk/ql/src/test/results/clientpositive/bucket_groupby.q.out
          • /hive/trunk/ql/src/test/results/clientpositive/exim_04_evolved_parts.q.out
          Show
          Hudson added a comment - Integrated in Hive-trunk-h0.21 #1562 (See https://builds.apache.org/job/Hive-trunk-h0.21/1562/ ) HIVE-3261 . alter the number of buckets for a non-empty partitioned table should not be allowed. (njain via kevinwilfong) (Revision 1364815) Result = FAILURE kevinwilfong : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1364815 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java /hive/trunk/ql/src/test/queries/clientnegative/alter_numbuckets_partitioned_table.q /hive/trunk/ql/src/test/queries/clientpositive/bucket_groupby.q /hive/trunk/ql/src/test/queries/clientpositive/exim_04_evolved_parts.q /hive/trunk/ql/src/test/results/clientnegative/alter_numbuckets_partitioned_table.q.out /hive/trunk/ql/src/test/results/clientpositive/bucket_groupby.q.out /hive/trunk/ql/src/test/results/clientpositive/exim_04_evolved_parts.q.out
          Hide
          Hudson added a comment -

          Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/)
          HIVE-3261. alter the number of buckets for a non-empty partitioned table should not be allowed. (njain via kevinwilfong) (Revision 1364815)

          Result = ABORTED
          kevinwilfong : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1364815
          Files :

          • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
          • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
          • /hive/trunk/ql/src/test/queries/clientnegative/alter_numbuckets_partitioned_table.q
          • /hive/trunk/ql/src/test/queries/clientpositive/bucket_groupby.q
          • /hive/trunk/ql/src/test/queries/clientpositive/exim_04_evolved_parts.q
          • /hive/trunk/ql/src/test/results/clientnegative/alter_numbuckets_partitioned_table.q.out
          • /hive/trunk/ql/src/test/results/clientpositive/bucket_groupby.q.out
          • /hive/trunk/ql/src/test/results/clientpositive/exim_04_evolved_parts.q.out
          Show
          Hudson added a comment - Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/ ) HIVE-3261 . alter the number of buckets for a non-empty partitioned table should not be allowed. (njain via kevinwilfong) (Revision 1364815) Result = ABORTED kevinwilfong : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1364815 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java /hive/trunk/ql/src/test/queries/clientnegative/alter_numbuckets_partitioned_table.q /hive/trunk/ql/src/test/queries/clientpositive/bucket_groupby.q /hive/trunk/ql/src/test/queries/clientpositive/exim_04_evolved_parts.q /hive/trunk/ql/src/test/results/clientnegative/alter_numbuckets_partitioned_table.q.out /hive/trunk/ql/src/test/results/clientpositive/bucket_groupby.q.out /hive/trunk/ql/src/test/results/clientpositive/exim_04_evolved_parts.q.out
          Hide
          Ashutosh Chauhan added a comment -

          This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.

          Show
          Ashutosh Chauhan added a comment - This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.

            People

            • Assignee:
              Namit Jain
              Reporter:
              Namit Jain
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development