Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#591 closed defect (fixed)

Mapping a cast to boolean to RasQL

Reported by: Piero Campalani Owned by: uadhikari
Priority: critical Milestone: 9.0.x
Component: petascope Version: development
Keywords: boolean bool cast Cc: mantovani@…, Vlad Merticariu, Alex Dumitru, Peter Baumann
Complexity: Easy

Description (last modified by Piero Campalani)

Petascope does not map the boolean cast operation to the correct bool equivalent in RasQL. It leaves the boolean keyword instead.

#WCPS
for c in (eobstest)
return encode (
  (boolean) 0
, "csv")

#RasQL
select csv((boolean)(0)) from eobstest AS c

The correct translation is:

#RasQL
--- select csv((boolean)(0)) from eobstest AS c
+++ select csv((bool)(0))    from eobstest AS c

Change History (8)

comment:1 by Piero Campalani, 11 years ago

The correct resolution of a boolean expression is then dependent on the resolution of #592.

comment:2 by Piero Campalani, 11 years ago

Description: modified (diff)

comment:3 by Piero Campalani, 11 years ago

Cc: Vlad Merticariu Alex Dumitru added

comment:4 by Dimitar Misev, 10 years ago

Owner: changed from Piero Campalani to uadhikari
Status: newassigned

comment:6 by Piero Campalani, 10 years ago

Great, thanks Veranika.
Again, I'll test your fixes asap, but remember in the future to let the reporter close the ticket, except under certain circumstances ;)

UseOfTickets

comment:7 by Piero Campalani, 10 years ago

Cc: Peter Baumann added

Peter: this ticket prompts a fix to the QL guide manual as well (Table 1, at least).

comment:8 by Peter Baumann, 10 years ago

hm, the rasdl script which initializes the database says:

typedef marray <boolean,2> BoolImage;

and lex.ll says:

"bool" { SETTOKEN( TBOOL, typeToken, TBOOL) }

…so where does "boolean" come into play?

Note: See TracTickets for help on using tickets.