Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Expanded section on partial contradictions. Converted issue number re…
Browse files Browse the repository at this point in the history
…ferences to links. Corrected formatting.
  • Loading branch information
ms14981 committed Jul 26, 2019
1 parent f8fd47d commit c7ca0e5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/user/Contradictions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ This document describes [how data is generated](SetRestrictionAndGeneration.md)
This is where contradictions occur in a way where no rows could be satisfied for at least one field. If this is the case then no rows can be emitted for any field in the profile, therefore the output file/s would be empty.
Hard contradictions can otherwise be described as removing all possible values from the universal set and denying the absence of values for the field; `not(is null)`.

Note that these contradictions can occur even if most of the profile is correct. If no data can be generated for a single field,
then it will prevent all the other fields from producing data.
Note that these contradictions can occur even if most of the profile is correct. If no data can be generated for a single field, then it will prevent all the other fields from producing data.

See [how data is generated](SetRestrictionAndGeneration.md) for more detail on how constraints are combined and in-turn reduce the set of permissible values for a field.

Expand All @@ -37,7 +36,13 @@ Examples of profiles are:
* [Type Validation 2](../../examples/hard-contradiction-type-validation-2/profile.json)

## 'Partial' contradictions
This is where part of a tree is fully contradictory.
This is where part of a profile is fully contradictory, i.e. where an otherwise valid profile contains a fully contradictory section. Partially contradictory profiles include ones with multiple fully contradictory sections. These usually occur when one part of an `anyOf` or an `if-then-else` is contradictory.

Examples are:
* (`is null` and `not(is null)`) or `equalTo 1`
* (`ofType string` and `ofType decimal` and `not(is null)`) or `ofType string`
* (`ofType string` and `shorterThan 1` and `not(is null)`) or `is null`
* (`equalTo 1` and `equalTo 2`) or (`is null` and `not(is null)`) or `ofType string`

Examples of profiles are:
* [Partial Contradiction in anyOf](../../examples/partial-contradictions/profile.json)
Expand All @@ -56,4 +61,4 @@ The following are examples of where constraints can be combined and (whilst pote

## Current stance
1. Contradiction checking to a greater degree will be deferred to tooling for the generator, such as profile writers, user interfaces, etc.
1. More detailed contradiction checking (#1090) and better upfront warnings (#896) are being considered as features.
1. More detailed contradiction checking [(#1090)](https://github.com/finos/datahelix/issues/1090) and better upfront warnings [(#896)](https://github.com/finos/datahelix/issues/896) are being considered as features.

0 comments on commit c7ca0e5

Please sign in to comment.