Commit dccbcb2
authored
[query-engine] Improve value equality logic (open-telemetry#2775)
# Changes
* Improve the value equality helper logic in expressions
# Details
The way things were coded, left-side of equality comparison determined
the type. So...
* `int(18) == string('value')` results in an error that string on
right-side could not be converted to int (evaluates as `int(18) ==
toint(string('value'))`)
* `string('value') == int(18)` results in `false` (evaluates as
`string('value') == tostring(int(18))`)
This PR adjusts the logic so that if either side of a comparison is a
string we will apply string logic. So...
* `int(18) == string('value')` results in `false` (evaluates as
`tostring(int(18)) == string('value')`)
* `string('value') == int(18)` results in `false` (evaluates as
`string('value') == tostring(int(18))`)1 parent ff7d0ad commit dccbcb2
1 file changed
Lines changed: 211 additions & 83 deletions
0 commit comments