Repository navigation
feat(nulls): NL004 nullable-db-field - #243
Merged
Merged
Conversation
Field::initial_is_unknown is true for the bare ? a .df writes for the unknown value, and false for INITIAL "?".
…of unknown values FileNulls::with_fields runs a second value solve per unit over the fields with INITIAL ? that are not MANDATORY and have no extent. A FIND, GET, CREATE or FOR pass fills the record again; writes, buffers passed to calls and shared buffers across calls leave a field Unknown; the WHERE of a FIND or FOR EACH holds of the record. The local solve and its findings are unchanged.
A database field that the schema starts at ? and does not make MANDATORY, used in an ordering comparison, as a condition or in arithmetic that is stored or displayed, with no test for ? before it. Opt-in strict.nulls rule, preview, Warning, routed like NL003.
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.
Strict ABL M5, slice 3: NL004 nullable-db-field, the last of the M5 rules.
?only when itsINITIALis?and it is notMANDATORY.oxabl_schemanow tells an unknownINITIALfrom a quoted question mark (initial_is_unknown, additive). No schema, no finding.oxabl_nullsruns a second, field-only solve over the units that read such a field, with the same guards (b.f = ?,b.f <> ?) and the same sinks as NL001 / NL002, and the same work budget.strict.nulls, preview, Warning, opt-in) with a bad and a fixed example and the reason.ASSIGN ... WHENguards).Corpus (two private trees): 595 and 165 findings; 2 of 76 triaged findings were wrong (under 3 %). NL001–NL003 are unchanged line for line, and default
oxabl checkoutput is byte-identical. With the group on, the field solve adds about 16 % on tree A and 4–8 % on tree B.cargo test --workspace(3,767), clippy-D warnings, fmt.