ramitg254 commented on code in PR #6413:
URL: https://github.com/apache/hive/pull/6413#discussion_r3450317193


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java:
##########
@@ -194,6 +201,9 @@ public Table makeCopy() {
 
     newTab.setMetaTable(this.getMetaTable());
     newTab.setSnapshotRef(this.getSnapshotRef());
+    if (this.tablePartCols != null) {
+      newTab.tablePartCols = new ArrayList<>(this.tablePartCols);

Review Comment:
   yes deep copy is better option to prevent mutation, done



##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java:
##########
@@ -682,7 +704,7 @@ public void setSkewedValueLocationMap(List<String> valList, 
String dirName) {
 
   public Map<List<String>, String> getSkewedColValueLocationMaps() {
     return (tTable.getSd().getSkewedInfo() != null) ? 
tTable.getSd().getSkewedInfo()
-        .getSkewedColValueLocationMaps() : new HashMap<List<String>, String>();
+        .getSkewedColValueLocationMaps() : new HashMap<>();

Review Comment:
   done



##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java:
##########
@@ -691,7 +713,7 @@ public void setSkewedColValues(List<List<String>> 
skewedValues) {
 
   public List<List<String>> getSkewedColValues(){
     return (tTable.getSd().getSkewedInfo() != null) ? 
tTable.getSd().getSkewedInfo()
-        .getSkewedColValues() : new ArrayList<List<String>>();
+        .getSkewedColValues() : new ArrayList<>();

Review Comment:
   done



##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java:
##########
@@ -700,7 +722,7 @@ public void setSkewedColNames(List<String> skewedColNames) {
 
   public List<String> getSkewedColNames() {
     return (tTable.getSd().getSkewedInfo() != null) ? 
tTable.getSd().getSkewedInfo()
-        .getSkewedColNames() : new ArrayList<String>();
+        .getSkewedColNames() : new ArrayList<>();

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to