InvisibleProgrammer commented on code in PR #4421:
URL: https://github.com/apache/hive/pull/4421#discussion_r1259676729
##########
ql/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java:
##########
@@ -740,18 +742,12 @@ public void testRevokeTimedOutWorkers() throws Exception {
public void testFindPotentialCompactions() throws Exception {
// Test that committing unlocks
long txnid = openTxn();
- LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB,
- "mydb");
- comp.setTablename("mytable");
- comp.setOperationType(DataOperationType.UPDATE);
- List<LockComponent> components = new ArrayList<LockComponent>(1);
- components.add(comp);
- comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB,
- "mydb");
- comp.setTablename("yourtable");
- comp.setPartitionname("mypartition=myvalue");
- comp.setOperationType(DataOperationType.UPDATE);
- components.add(comp);
+
+ List<LockComponent> components = new ArrayList<>(1);
Review Comment:
I think it was a leftover from some previous unnecessary optimisation. I
removed the initial capacities.
--
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]