Skip to content

Ignore empty list of tables - #1307

Closed
def- wants to merge 1 commit into
sqlancer:mainfrom
MaterializeInc:pr-sqlancer-fix
Closed

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

Conversation

@def-

@def- def- commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

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.

@mrigger

mrigger commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Closing due to #1332.

@mrigger mrigger closed this Apr 25, 2026
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