Opened 12 years ago

Closed 9 years ago

#227 closed defect (fixed)

WCPS1.5_WCPS errors when reduceExpr is first operand in arithmetic operation

Reported by: Piero Campalani Owned by: Alex Dumitru
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: wcps arithmetic reduce expression Cc:
Complexity: Medium

Description

In general, when a WCPS reduce expression is put as first operand in an arithmetic operation, you get error:

For example, reduceExpr * constant:

for c in (mr) return 
   encode(
      count(trim(c, {x(100:101),y(100:101)}) > 0) * 2, 
   "csv")

but when the constant is put before (2 * ...) it all works.

Similarly, this query won't work:

for c in (mr) return 
   encode(
      count(trim(c, {x(100:101),y(100:101)}) > 0) * 
      max(trim(c, {x(100:101),y(100:101)})), 
   "csv")

This does not seem to hold for coverage expressions (e.g. trims and slices):

for c in (mr) return 
   encode( 
      trim(c, {x(100:101),y(100:101)}) * 
      trim(c, {x(102:103),y(102:103)}), 
   "csv")

Change History (9)

comment:1 by Alireza, 12 years ago

Owner: changed from Dimitar Misev to Alireza
Status: newassigned

comment:2 by Dimitar Misev, 12 years ago

This problem has been fixed by Alireza, but that has created another WCPS test fail, so it's not considered completely fixed yet.

comment:3 by Peter Baumann, 12 years ago

Milestone: Future
Version: 8.3

comment:4 by Dimitar Misev, 12 years ago

Milestone: Future9.0

Looks a bit more important than Future to me, so setting to 9.0

comment:5 by Dimitar Misev, 10 years ago

Complexity: Very Hard
Owner: changed from Alireza to Bidesh Thapaliya

comment:6 by Dimitar Misev, 10 years ago

Complexity: Very HardMedium

comment:7 by Dimitar Misev, 9 years ago

Owner: changed from Bidesh Thapaliya to Alex Dumitru

comment:8 by Bang Pham Huu, 9 years ago

Milestone: 9.0.x10.0
Summary: WCPS errors when reduceExpr is first operand in arithmetic operationWCPS1.5_WCPS errors when reduceExpr is first operand in arithmetic operation
Version: 8.3development

Piero: I'm collecting WCPS errors and prepare to fix in next version called WCPS1.5, then your ticket will be moved to next release.

comment:9 by Bang Pham Huu, 9 years ago

Resolution: fixed
Status: assignedclosed

I've tested with WCPS1.0 and WCPS1.5 from Piero's queries with changing from axis x, y to i, j and it works. Then will close this ticket, here. (Dimitar can open it if you have the exception case then I will test again).

Note: See TracTickets for help on using tickets.