Repository navigation
Only reject queries on tables with unmapped column types - #1844
Open
agusaldasoro wants to merge 3 commits into
Open
agusaldasoro wants to merge 3 commits into
agusaldasoro wants to merge 3 commits into
Conversation
Every table is declared for every query, so one column whose type has no SMT-LIB mapping made generation fail for all queries against the schema. Such tables, and those referencing them through foreign keys, are now left out of the formula, and only the queries reading them are rejected.
agusaldasoro
marked this pull request as ready for review
October 8, 2026 09:48
agusaldasoro
marked this pull request as draft
October 8, 2026 09:50
agusaldasoro
marked this pull request as ready for review
October 8, 2026 17:21
jgaleotti
approved these changes
Oct 8, 2026
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.
Problem
SmtLibGeneratordeclares every table of the schema for every query.getConstructorsthrowsUnsupported column typefor any column whose type has no entry inTYPE_MAP(e.g.BLOB,BYTEA,JSON,UUIDdepending on the backend). So a single such column anywhere in the schema made generation fail for every query, including queries on tables that never touch it. In a schema like that, the solver produced no data at all.Fix
SmtLibGeneratorcomputes the tables it leaves out of the formula (undeclaredTables):smtTables, so their declarations, keys, CHECKs, boolean/timestamp constraints andget-values are all skipped.generateSMTfirst rejects a query that reads from an excluded table (rejectUndeclaredTables). TheUnsupported column type: …message now names the column and table. Such a query is still recorded as an untranslatableSMTLIB_GENERATIONfailure, as before.Tests
New
UnmappedColumnTypeTest, on an H2 schema withusers,blobs (payload blob)andblob_refs(FK toblobs):usersis translated, andblobsdoes not appear in the formula. Onmasterthis throwsUnsupported column type;blobsis rejected;blob_refsis rejected.UntranslatableQueryCacheTestkeeps using a query on theblobtable as its generation failure. Only its comment changed: it said every query against that schema fails.All tests under
org.evomaster.core.database.sql.solverpass.