Refactor block_using_rules_sql
to follow normal pattern and avoid confusion
#1695
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of PR
Is your Pull Request linked to an existing Issue or Pull Request?
This pr revealed a mistake I made in
blocking.block_using_rules_sql
whereby the function was not a pure function that returned just SQL.Instead, it the case of a
_two_dataset_link_only
it was running_enqueue_sql
- a side effect that means this sql gets 'lost' if you look at the results of the function.This is contrary to the pattern elsewhere in the codebase where, if multiple tables need queuing, then the function should return a list of sql statements. This pattern is used everywhere we see code like:
Give a brief description for the solution you have provided
I've adjusted
block_using_rules_sql
to beblock_using_rules_sqls
.Think it's a good idea to get this merged before #1664 to try and keep additional complexity to a minimum