Added option flag to exclude certain statements#16
Open
sdressler wants to merge 1 commit intoanse1:masterfrom
Open
Added option flag to exclude certain statements#16sdressler wants to merge 1 commit intoanse1:masterfrom
sdressler wants to merge 1 commit intoanse1:masterfrom
Conversation
Owner
|
Hi Sebastian,
thanks for your patch. I'm unsure whether to merge it though, details
below.
Sebastian Dreßler writes:
Great tool! As we are developing a PSQL DB plugin where certain
statements are not supported, I wanted to exclude these. IMO my
implementation is rather naive and I certainly can do better but I
need to understand the code a bit more first. It currently focuses
only on statements like UPDATE, DELETE, ...
I originally intended the impedance matching code (impedance.cc) as a
means to deal with unsupported output from sqlsmith. Statements - or
any other productions of the grammar - that consistently lead to an
error are automatically put on a blacklist. I'm afraid it doesn't work
right-away with plain update or delete statements because the check
whether the production was blacklisted is missing. So far, I only added
this check to productions that are known not to be widely supported,
such as UPDATE RETURNING or UPSERT (see the calls to match()).
Currently, I have the impression that adding these calls to make the
automatic blacklisting work for the statements unsupported by your
extension is a more consistent solution, and the patch would be
redundant then. Would this solution work for you?
I also took the liberty to switch the comparison to a lambda which
increases maintainability IMO.
Yay :-)
- Change the lookup to a bitmask, haven't checked the impact on the
query generation rate yet but I think it slows down.
Not needed: SQLsmith is spending most of the time constructing subtrees
and then discarding them and backtracking because it cannot find a way
to join it. A simple check at a top-level statement shouldn't be
relevant in contrast.
regards,
Andreas
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Great tool! As we are developing a PSQL DB plugin where certain statements are not supported, I wanted to exclude these. IMO my implementation is rather naive and I certainly can do better but I need to understand the code a bit more first. It currently focuses only on statements like UPDATE, DELETE, ...
I also took the liberty to switch the comparison to a lambda which increases maintainability IMO.
Potential improvements are: