Opened 10 years ago

Closed 9 years ago

#821 closed task (fixed)

WCPS1.5_Range constructor in WCPS

Reported by: Dimitar Misev Owned by: Alex Dumitru
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: Cc:
Complexity: Medium

Description

Currently the range constructor in WCPS like

for c in (COV)
return
 {
  red: c.red;
  green: c.green;
  blue: c.blue
 }

is translated to the below in rasql:

select
  c.red * {1c,0c,0c} +
  c.green * {0c,1c,0c} +
  c.blue * {0c,0c,1c}
from COV as c

Ticket #209 implements an MDD range constructor, so the WCPS translation should be changed to produce the following rasql query:

select
  { c.red, c.green, c.blue }
from COV as c

This should be done in source:applications/petascope/src/main/java/petascope/wcps/server/core/RangeCoverageExpr.java

Change History (4)

comment:1 by Dimitar Misev, 9 years ago

Owner: changed from Bidesh Thapaliya to Alex Dumitru
Status: newassigned

comment:2 by Bang Pham Huu, 9 years ago

Milestone: 9.0.x10.0
Summary: Range constructor in WCPSWCPS1.5_Range constructor in WCPS

comment:3 by Peter Baumann, 9 years ago

getting this below when trying to accept patch.

Applying: ticket:1236 - 1246 fix problem with extend, unary bit with do
Using index info to reconstruct a base tree…
M applications/petascope/src/main/java/petascope/wcps2/parser/wcps.g4
M applications/petascope/src/main/java/petascope/wcps2/parser/wcpsBaseListener.java
M applications/petascope/src/main/java/petascope/wcps2/parser/wcpsBaseVisitor.java
M applications/petascope/src/main/java/petascope/wcps2/parser/wcpsEvaluator.java
M applications/petascope/src/main/java/petascope/wcps2/parser/wcpsListener.java
M applications/petascope/src/main/java/petascope/wcps2/parser/wcpsParser.java
M applications/petascope/src/main/java/petascope/wcps2/parser/wcpsVisitor.java
M applications/petascope/src/main/java/petascope/wcps2/translator/ExtendExpression.java
M applications/petascope/src/main/java/petascope/wcps2/translator/ScaleExpression.java
M applications/petascope/src/main/java/petascope/wcps2/translator/UnaryBooleanExpression.java
<stdin>:40: trailing whitespace.

| unaryPowerExpression

<stdin>:49: trailing whitespace.
/
<stdin>:50: trailing whitespace.

<stdin>:51: trailing whitespace.

  • Example

<stdin>:52: trailing whitespace.

  • pow($coverage, 3)

warning: squelched 25 whitespace errors
warning: 30 lines add whitespace errors.
Falling back to patching base and 3-way merge…
Auto-merging applications/petascope/src/main/java/petascope/wcps2/parser/wcpsParser.java
CONFLICT (content): Merge conflict in applications/petascope/src/main/java/petascope/wcps2/parser/wcpsParser.java
Failed to merge in the changes.
Patch failed at 0001 ticket:1236 - 1246 fix problem with extend, unary bit with do
The copy of the patch that failed is found in:

/tmp/tmp7yyPjAtbranch1978/.git/rebase-apply/patch

When you have resolved this problem, run "git am —continue".
If you prefer to skip this patch, run "git am —skip" instead.
To restore the original branch and stop patching, run "git am —abort".

comment:4 by Bang Pham Huu, 9 years ago

Resolution: fixed
Status: assignedclosed

@Prof.Peter: thanks for your notification, also the patch for this ticket was accepted and this is another problem when you tried to apply patch for http://rasdaman.org/ticket/1236. The problem could be due to the overlap between each patches (e.g: this patch for ticket 1236, 1246 should be accepted before other patches) as I always submit patch in this kind of order.

So I'll modify a little bit for this patch (ticket 1236, 1246) so it can apply with newest code in wcps2_features and close this ticket here (as it was accepted).

Note: See TracTickets for help on using tickets.