diff --git a/pkg/sql/stats/automatic_stats_test.go b/pkg/sql/stats/automatic_stats_test.go index 90605c1d1455..46f353490db7 100644 --- a/pkg/sql/stats/automatic_stats_test.go +++ b/pkg/sql/stats/automatic_stats_test.go @@ -429,6 +429,17 @@ func TestDefaultColumns(t *testing.T) { sqlRun.Exec(t, `CREATE STATISTICS s FROM t.a`) + // TODO(rytaft): this extra logging was added to help debug issue #38572. + // Remove it once that issue is resolved. + // === BEGINNING OF EXTRA LOGGING === + res := sqlRun.QueryStr(t, `SHOW CREATE TABLE t.a`) + t.Log(sqlutils.MatrixToStr(res)) + res = sqlRun.QueryStr(t, `EXPLAIN (DISTSQL) CREATE STATISTICS s FROM t.a`) + t.Log(sqlutils.MatrixToStr(res)) + res = sqlRun.QueryStr(t, `SHOW STATISTICS FOR TABLE t.a`) + t.Log(sqlutils.MatrixToStr(res)) + // === END OF EXTRA LOGGING === + // There should be 101 stats. One for the primary index, plus 100 other // columns. sqlRun.CheckQueryResults(t,