Skip to content

Commit

Permalink
iiiii
Browse files Browse the repository at this point in the history
Signed-off-by: Seaven <[email protected]>
  • Loading branch information
Seaven committed Nov 7, 2024
1 parent aa2d5ff commit daf0a3a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,7 @@ private void executeAnalyze(AnalyzeStmt analyzeStmt, AnalyzeStatus analyzeStatus
statsConnectCtx.getSessionVariable().setStatisticCollectParallelism(
context.getSessionVariable().getStatisticCollectParallelism());
statsConnectCtx.setThreadLocalInfo();
statsConnectCtx.setStatisticsConnection(true);
try {
executeAnalyze(statsConnectCtx, analyzeStmt, analyzeStatus, db, table);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private void flushInsertStatisticsData(ConnectContext context) throws Exception
}

private StatementBase createInsertStmt() {
String sql = "INSERT INTO column_statistics values " + String.join(", ", sqlBuffer) + ";";
String sql = "INSERT INTO _statistics_.column_statistics values " + String.join(", ", sqlBuffer) + ";";
List<String> names = Lists.newArrayList("column_0", "column_1", "column_2", "column_3",
"column_4", "column_5", "column_6", "column_7", "column_8", "column_9",
"column_10", "column_11", "column_12");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public class StatisticSQLs {
public static final String BATCH_NDV_STATISTIC_TEMPLATE = "SELECT cast($version as INT)" +
", cast($partitionId as BIGINT)" + // BIGINT, partition_id
", '$columnNameStr'" + // VARCHAR, column_name
", 0" + // BIGINT, row_count
", 0" + // BIGINT, data_size
", cast(0 as BIGINT)" + // BIGINT, row_count
", cast(0 as BIGINT)" + // BIGINT, data_size
", $hllFunction" + // VARBINARY, ndv
", 0" + // BIGINT, null_count
", cast(0 as BIGINT)" + // BIGINT, null_count
", ''" + // VARCHAR, max
", '' " + // VARCHAR, min
" FROM `$dbName`.`$tableName` partitions(`$partitionName`)";
Expand Down

0 comments on commit daf0a3a

Please sign in to comment.