[fix][refactor] fix bugs and refactor some code by lint (#7871)
1. Fix some `passedByValue` issues. 2. Fix some `dereferenceBeforeCheck` issues. 3. Fix some `uninitMemberVar` issues. 4. Fix some iterator `eraseDereference` issues. 5. Fix compile issue introduced from #7923 #7905 #7848
This commit is contained in:
@ -2717,7 +2717,7 @@ show_param ::=
|
||||
{:
|
||||
RESULT = new ShowAlterStmt(type, db, parser.where, orderByClause, limitClause);
|
||||
:}
|
||||
| KW_SHOW KW_DATA KW_SKEW KW_FROM base_table_ref:table_ref
|
||||
| KW_DATA KW_SKEW KW_FROM base_table_ref:table_ref
|
||||
{:
|
||||
RESULT = new ShowDataSkewStmt(table_ref);
|
||||
:}
|
||||
|
||||
@ -3933,7 +3933,7 @@ public class Catalog {
|
||||
long totalReplicaNum = 0;
|
||||
for (Map.Entry<String, Long> entry : partitionNameToId.entrySet()) {
|
||||
long indexNum = olapTable.getIndexIdToMeta().size();
|
||||
long bucketNum = distributionInfo.getBucketNum();
|
||||
long bucketNum = defaultDistributionInfo.getBucketNum();
|
||||
long replicaNum = partitionInfo.getReplicaAllocation(entry.getValue()).getTotalReplicaNum();
|
||||
totalReplicaNum += indexNum * bucketNum * replicaNum;
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@ -18,6 +18,7 @@ package org.apache.doris.mysql.nio;
|
||||
|
||||
import org.apache.doris.qe.ConnectContext;
|
||||
import org.apache.doris.qe.ConnectProcessor;
|
||||
|
||||
import org.xnio.StreamConnection;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -59,4 +60,10 @@ public class NConnectContext extends ConnectContext {
|
||||
public void stopAcceptQuery() throws IOException {
|
||||
mysqlChannel.stopAcceptQuery();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[remote ip: " + mysqlChannel.getRemoteIp() + "]";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -133,6 +133,7 @@ public class CatalogOperationTest {
|
||||
Assert.assertEquals(AlterJobV2.JobState.FINISHED, alterJobV2.getJobState());
|
||||
}
|
||||
|
||||
Thread.sleep(1000);
|
||||
renameTblStmt = "alter table test.newNewTest rename r1";
|
||||
alterTableStmt = (AlterTableStmt)UtFrameUtils.parseAndAnalyzeStmt(renameTblStmt, connectContext);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user