Skip to content

Commit

Permalink
execbuilder: de-flake a recently introduced test
Browse files Browse the repository at this point in the history
I'm not able to reproduce the flake under stress, but for some reason it
appears that the stats on a system table are collected even though we
disable the auto stats collection. Those stats rarely show a different
`estimated row count`, so this commit skips that line from the output of
the EXPLAIN. This is acceptable given the goal of the test is ensuring
that a secondary index is used for the scan.

Release note: None
  • Loading branch information
yuzefovich committed Feb 28, 2023
1 parent 5f34f44 commit 39cc2c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/sql/opt/exec/execbuilder/testdata/explain_analyze
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,18 @@ regions: <hidden>
statement ok
GRANT SELECT ON crdb_internal.tables TO root;

# For some reason, even though we explicitly disable the automatic stats
# collection for both user and system tables, rarely we still see that the stats
# on system.privileges were collected, so we filter out a single line from the
# output to make the test deterministic.
query T
EXPLAIN (VERBOSE) SELECT * FROM system.privileges WHERE path = 'vtable/crdb_internal/tables';
SELECT * FROM [EXPLAIN (VERBOSE) SELECT * FROM system.privileges WHERE path = 'vtable/crdb_internal/tables']
WHERE info NOT LIKE '%estimated row count%';
----
distribution: local
vectorized: true
·
• scan
columns: (username, path, privileges, grant_options, user_id)
estimated row count: 10 (missing stats)
table: privileges@privileges_path_user_id_key
spans: /"vtable/crdb_internal/tables"-/"vtable/crdb_internal/tables"/PrefixEnd

0 comments on commit 39cc2c1

Please sign in to comment.