Skip to content

Commit

Permalink
Remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Aug 9, 2024
1 parent a5b1e53 commit 91bcb0d
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions grafast/dataplan-pg/src/steps/pgSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2634,15 +2634,11 @@ ${lateralText};`;
return sql`${step.toSQL()}::${
codec.sqlType
} = ${identifierMatch}`;
} else if (isStaticInputStep(step)) {
} else {
return sql`${this.placeholder(
step,
codec,
)} = ${identifierMatch}`;
} else {
throw new Error(
`Expected ${step} (${i}th dependency of ${this}; step with id ${dependencyIndex}) to be a PgClassExpressionStep`,
);
}
}),
// Note the WHERE is now part of the JOIN condition (since
Expand Down Expand Up @@ -2705,14 +2701,10 @@ ${lateralText};`;
return this.where(
sql`${step.toSQL()}::${codec.sqlType} = ${identifierMatch}`,
);
} else if (isStaticInputStep(step)) {
} else {
return this.where(
sql`${this.placeholder(step, codec)} = ${identifierMatch}`,
);
} else {
throw new Error(
`Expected ${step} (${i}th dependency of ${this}; step with id ${dependencyIndex}) to be a PgClassExpressionStep`,
);
}
});
this.mergePlaceholdersInto(table);
Expand Down

0 comments on commit 91bcb0d

Please sign in to comment.