Closed bovine closed 8 years ago
New work branch "issue54".
I don't see a useful behavior for match on integers, so my preference is to make match on integer be an error. Maybe if you converted them on the fly to strings and then did a string match, but, yuk.
Match on floats probably also will crash for the same reason as integers.
I can see reasons to want string match on other types (eg if you use integers to store serial numbers with internal structure), but there are likely numerical (and faster, if indexed) alternatives and putting a string conversion in the search loop would be pretty slow. I'm already working on making anything but fixed or var strings an error.
Jeff - can you check issue54 and maybe merge it if you're happy with the results?
Also added checks in tests for this case.
Seems to work. I'll merge it into master.
connect {fa_birdseye - connect from ::1 51008 - help for help}
inflight search -compare "{match arrivalTime 123456}"
error {term "arrivalTime" must be a string type for "match" operation while processing search compare}
inflight search -compare "{= arrivalTime 123456}"
ok 0
merged
The following command will crash speedtables because match is being used against an integer (long) field:
The following command works, without crashing:
Either "match" should be made to work against integer fields, or it should return an error if you attempt to use that in a query.