#592 closed defect (fixed)
Cast to bool in RasQL
Reported by: | Piero Campalani | Owned by: | Veranika Liaukevich |
---|---|---|---|
Priority: | minor | Milestone: | 9.0.x |
Component: | qlparser | Version: | development |
Keywords: | cast bool rasql | Cc: | mantovani@… |
Complexity: | Medium |
Description
Casting to a boolean (scalar or marray) does not seem to work in RasQL: it seems to take the first byte instead of evaluating whether the number/cell is not 0:
$ rasql --user rasadmin --passwd rasadmin --out hex -q "select ((bool)((c) [3,50:52,151])) from eobstest AS c": Result object 1: 48 7b b1 $ rasql --user rasadmin --passwd rasadmin --out hex -q "select (((c) [3,50:52,151])) from eobstest AS c" Result object 1: 48 fd 7b fc b1 fb
With scalars, things work, although there is still a problem with the CSV encoding (#588).
$ rasql --user rasadmin --passwd rasadmin --out string -q "select ((bool)(100)) from eobstest AS c" Result element 1: t <- OK $ rasql --user rasadmin --passwd rasadmin --out string -q "select csv((bool)(100)) from eobstest AS c" Result object 1: {100} <- WRONG
Change History (7)
comment:1 by , 11 years ago
Priority: | major → minor |
---|
comment:2 by , 11 years ago
Complexity: | Hard → Medium |
---|---|
Component: | undecided → qlparser |
Milestone: | Future → 9.0.x |
Owner: | changed from | to
Status: | new → assigned |
comment:6 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Yes, it was fixed in changeset:c6523460dc and changeset:0310ad111.
Btw, I don't receive emails when patches are applied anymore. Was it done intentionally?
Note:
See TracTickets
for help on using tickets.
Lowering priority since WCPS queries can still allow non-CSV encoded scalar expressions.