[
https://issues.apache.org/jira/browse/HIVE-22826?focusedWorklogId=494022&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-494022
]
ASF GitHub Bot logged work on HIVE-22826:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Oct/20 15:49
Start Date: 02/Oct/20 15:49
Worklog Time Spent: 10m
Work Description: ashish-kumar-sharma commented on a change in pull
request #1528:
URL: https://github.com/apache/hive/pull/1528#discussion_r498905028
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/column/change/AlterTableChangeColumnOperation.java
##########
@@ -72,6 +74,10 @@ protected void doAlteration(Table table, Partition
partition) throws HiveExcepti
if (desc.getNewColumnComment() != null) {
oldColumn.setComment(desc.getNewColumnComment());
}
+ if (CollectionUtils.isNotEmpty(sd.getBucketCols()) &&
sd.getBucketCols().contains(oldColumnName)) {
+ sd.getBucketCols().remove(oldColumnName);
+ sd.getBucketCols().add(desc.getNewColumnName());
Review comment:
newColumnName is converted toLowerCase in query planning while
populating "desc" but to be fail safe i have added toLowerCase() here also.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 494022)
Time Spent: 2h 40m (was: 2.5h)
> ALTER TABLE RENAME COLUMN doesn't update list of bucketed column names
> -----------------------------------------------------------------------
>
> Key: HIVE-22826
> URL: https://issues.apache.org/jira/browse/HIVE-22826
> Project: Hive
> Issue Type: Bug
> Components: Query Planning
> Affects Versions: 4.0.0
> Reporter: Karen Coppage
> Assignee: Ashish Sharma
> Priority: Major
> Labels: pull-request-available
> Attachments: unitTest.patch
>
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> Compaction for tables where a bucketed column has been renamed fails since
> the list of bucketed columns in the StorageDescriptor doesn't get updated
> when the column is renamed, therefore we can't recreate the table correctly
> during compaction.
> Attached a unit test that fails.
> NO PRECOMMIT TESTS
--
This message was sent by Atlassian Jira
(v8.3.4#803005)