morrySnow commented on code in PR #36115:
URL: https://github.com/apache/doris/pull/36115#discussion_r1635799571
##########
fe/fe-core/src/main/java/org/apache/doris/statistics/BaseAnalysisTask.java:
##########
@@ -408,11 +422,20 @@ protected void doPartitionTable() throws Exception {
+ Joiner.on(" UNION ALL ").join(sqls);
runInsert(sql);
}
- params = buildSqlParams();
- params.put("min", castToNumeric("min"));
- params.put("max", castToNumeric("max"));
- StringSubstitutor stringSubstitutor = new StringSubstitutor(params);
- runQuery(stringSubstitutor.replace(MERGE_PARTITION_TEMPLATE));
+ if (hasHughPartition) {
+ tableSample = new TableSample(false,
StatisticsUtil.getHugeTableSampleRows());
+ if (!isSync) {
+ jobInfo = new
AnalysisInfoBuilder(jobInfo).setAnalysisMethod(AnalysisMethod.SAMPLE).build();
+ analysisManager.replayCreateAnalysisJob(jobInfo);
+ }
+ doSample();
Review Comment:
do not re-sample if we do not need to sample this table again
--
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]