Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#591 closed defect (fixed)

Mapping a cast to boolean to RasQL

Reported by: pcampalani Owned by: uadhikari
Priority: critical Milestone: 9.0.x
Component: petascope Version: development
Keywords: boolean bool cast Cc: mantovani@…, vmerticariu, mdumitru, pbaumann
Complexity: Easy

Description (last modified by pcampalani)

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 Changed 4 years ago by pcampalani

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

comment:2 Changed 4 years ago by pcampalani

  • Description modified (diff)

comment:3 Changed 4 years ago by pcampalani

  • Cc vmerticariu mdumitru added

comment:4 Changed 3 years ago by dmisev

  • Owner changed from pcampalani to uadhikari
  • Status changed from new to assigned

comment:5 Changed 3 years ago by uadhikari

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:6 Changed 3 years ago by pcampalani

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 Changed 3 years ago by pcampalani

  • Cc pbaumann added

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

comment:8 Changed 3 years ago by pbaumann

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.