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

fix(#1489): Fix equal to offset for whitelist #1571

Merged
merged 4 commits into from
Dec 3, 2019

Conversation

r-stuart
Copy link
Contributor

@r-stuart r-stuart commented Dec 2, 2019

Description

Partial fix for the ticket #1489. This fixes the equal to case, but
doesn't address the before or after cases.

The reason for a partial fix is due to the difficulty comparing the two
different cases (equal vs before/after).

Equal to is simple because all of the values can be adjusted by the
offset, translating a set of values to a set of values.

Before/after are more complicated, as theoretically each of the values
must be translated to a range. This therefore means the result is a set
of restrictions. Unfortunately, the system isn't designed to be passing
around a set of restrictions at this time in the program. Therefore,
this will take further thought.

A possible solution is to take the most restrictive of the values. This
would ensure that whichever values are picked are permissable, but would
severely limit the number of values output.

Issue

Related to #1489

Partial fix for the ticket #1489. This fixes the equal to case, but
doesn't address the before or after cases.

The reason for a partial fix is due to the difficulty comparing the two
different cases (equal vs before/after).

Equal to is simple because all of the values can be adjusted by the
offset, translating a set of values to a set of values.

Before/after are more complicated, as theoretically each of the values
must be translated to a range. This therefore means the result is a set
of restrictions. Unfortunately, the system isn't designed to be passing
around a set of restrictions at this time in the program. Therefore,
this will take further thought.

A possible solution is to take the most restrictive of the values. This
would ensure that whichever values are picked are permissable, but would
severely limit the number of values output.
@r-stuart r-stuart force-pushed the 1489-fix-equal-to-offset branch from caba76e to 8c9ce17 Compare December 2, 2019 16:01
@r-stuart r-stuart force-pushed the 1489-fix-equal-to-offset branch 2 times, most recently from 329df21 to bc6580c Compare December 3, 2019 09:16
@r-stuart r-stuart requested a review from Tom-hayden December 3, 2019 09:17
Partial fix for the ticket #1489. This fixes the equal to case, but
doesn't address the before or after cases.

The reason for a partial fix is due to the difficulty comparing the two
different cases (equal vs before/after).

Equal to is simple because all of the values can be adjusted by the
offset, translating a set of values to a set of values.

Before/after are more complicated, as theoretically each of the values
must be translated to a range. This therefore means the result is a set
of restrictions. Unfortunately, the system isn't designed to be passing
around a set of restrictions at this time in the program. Therefore,
this will take further thought.

A possible solution is to take the most restrictive of the values. This
would ensure that whichever values are picked are permissable, but would
severely limit the number of values output.
@r-stuart r-stuart force-pushed the 1489-fix-equal-to-offset branch from bc6580c to c4909b8 Compare December 3, 2019 09:21
return FieldSpecFactory.nullOnly();
}
if (otherFieldSpec instanceof WhitelistFieldSpec) {
throw new UnsupportedOperationException("cannot combine sets with equal to offset relation, Issue #1489");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm shocked this wasn't working before 😄

@r-stuart r-stuart merged commit ecd1943 into master Dec 3, 2019
@r-stuart r-stuart deleted the 1489-fix-equal-to-offset branch December 3, 2019 09:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants