-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In the distribution process of the NOT operator in the WHERE clause, for binary logic, the negation of LT and GT is not GE and LE, but NotLT and NotGT.
(In the case of ternary logic, the negation of LT and GT is GE and LE.)
go-open-soql-parser/soql/parser/postprocess/normalize2.go
Lines 101 to 122 in 7d39758
func distributeNotOperators(conditions []SoqlCondition) []SoqlCondition { | |
for i := 0; i < len(conditions); i++ { | |
switch conditions[i].Opcode { | |
case SoqlConditionOpcode_Not: | |
for j := 0; j < i; j++ { | |
switch conditions[j].Opcode { | |
case SoqlConditionOpcode_And: | |
conditions[j].Opcode = SoqlConditionOpcode_Or | |
case SoqlConditionOpcode_Or: | |
conditions[j].Opcode = SoqlConditionOpcode_And | |
case SoqlConditionOpcode_Eq: | |
conditions[j].Opcode = SoqlConditionOpcode_NotEq | |
case SoqlConditionOpcode_NotEq: | |
conditions[j].Opcode = SoqlConditionOpcode_Eq | |
case SoqlConditionOpcode_Lt: | |
conditions[j].Opcode = SoqlConditionOpcode_Ge | |
case SoqlConditionOpcode_Le: | |
conditions[j].Opcode = SoqlConditionOpcode_Gt | |
case SoqlConditionOpcode_Gt: | |
conditions[j].Opcode = SoqlConditionOpcode_Le | |
case SoqlConditionOpcode_Ge: | |
conditions[j].Opcode = SoqlConditionOpcode_Lt |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working