[LOGIC-51] fd comparison relations behave strange when used with literals Created: 07/Sep/12 Updated: 26/Oct/12 Resolved: 26/Oct/12
|Reporter:||Tassilo Horn||Assignee:||David Nolen|
java version "1.7.0_07"
The fd comparison relations always succeed when used with strings or a string and an integer:
IMHO, they should always fail if one argument is not a integer.
Furthermore, you get an exception when comparing integers and the larger integer is given first.
I'd expect that comparisons of two integers should always work. You can circumvent this issue by unifying the numbers with some logic variables first, but is that really needed?
The first issue cannot be circumvented using this approach, though.
|Comment by David Nolen [ 07/Sep/12 11:14 AM ]|
Thanks for the report will look into it.
|Comment by David Nolen [ 26/Oct/12 1:06 AM ]|
I see no particular need to validate inputs. The other issues should be resolved in one of the latest betas.
|Comment by Tassilo Horn [ 26/Oct/12 2:01 AM ]|
> I see no particular need to validate inputs.
Well, the reported behavior ("every non-integer is both smaller and greater than anything") is likely to hide bugs in queries. But hey, even if you don't see a particular need, something you did fixed that problem anyhow.
This is with 0.8.0-beta1:
IMO, both an exception and simply failing would be ok in those situations. Exception like now is probably even better.
> The other issues should be resolved in one of the latest betas.
Yes, it is. Thanks a lot, David! Feel free to close this issue.
|Comment by David Nolen [ 26/Oct/12 7:04 AM ]|
Thanks for the update!