Skip to content

Ignore empty list of tables#1307

Open
def- wants to merge 1 commit intosqlancer:mainfrom
MaterializeInc:pr-sqlancer-fix
Open

Ignore empty list of tables#1307
def- wants to merge 1 commit intosqlancer:mainfrom
MaterializeInc:pr-sqlancer-fix

Conversation

@def-
Copy link
Copy Markdown
Collaborator

@def- def- commented Mar 30, 2026

No description provided.

public A getRandomTable(Predicate<A> predicate) {
return Randomly.fromList(getDatabaseTables().stream().filter(predicate).collect(Collectors.toList()));
List<A> filteredTables = getDatabaseTables().stream().filter(predicate).collect(Collectors.toList());
if (filteredTables.isEmpty()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method getRandomTableOrBailout below already implements this. I guess this method here should be called when it is clear that at least one table should match, in order to not mask any potential bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants