Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2558,6 +2558,9 @@ public StatementBase setParsedStmt(StatementBase parsedStmt) {

public List<ResultRow> executeInternalQuery() {
LOG.debug("INTERNAL QUERY: " + originStmt.toString());
UUID uuid = UUID.randomUUID();
TUniqueId queryId = new TUniqueId(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());
context.setQueryId(queryId);
try {
List<ResultRow> resultRows = new ArrayList<>();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import org.apache.doris.statistics.StatisticConstants;
import org.apache.doris.system.Frontend;
import org.apache.doris.system.SystemInfoService;
import org.apache.doris.thrift.TUniqueId;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
Expand Down Expand Up @@ -104,7 +103,6 @@
import java.util.Objects;
import java.util.Optional;
import java.util.StringJoiner;
import java.util.UUID;
import java.util.function.Function;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -187,9 +185,6 @@ public static AutoCloseConnectContext buildConnectContext(boolean limitScan) {
connectContext.setDatabase(FeConstants.INTERNAL_DB_NAME);
connectContext.setQualifiedUser(UserIdentity.ROOT.getQualifiedUser());
connectContext.setCurrentUserIdentity(UserIdentity.ROOT);
UUID uuid = UUID.randomUUID();
TUniqueId queryId = new TUniqueId(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());
connectContext.setQueryId(queryId);
connectContext.setStartTime();
connectContext.setCluster(SystemInfoService.DEFAULT_CLUSTER);
return new AutoCloseConnectContext(connectContext);
Expand Down
21 changes: 21 additions & 0 deletions regression-test/suites/statistics/analyze_stats.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1035,5 +1035,26 @@ PARTITION `p599` VALUES IN (599)
SELECT * FROM analyze_test_with_schema_update;
"""

sql """
DROP TABLE IF EXISTS two_thousand_partition_table_test
"""

sql """
CREATE TABLE two_thousand_partition_table_test (col1 int(11451) not null)
DUPLICATE KEY(col1)
PARTITION BY RANGE(`col1`)
(
from (0) to (1000001) INTERVAL 500
)
DISTRIBUTED BY HASH(col1)
BUCKETS 3
PROPERTIES(
"replication_num"="1"
);
"""

sql """
ANALYZE TABLE two_thousand_partition_table_test WITH SYNC;
"""

}