Opened 12 years ago

Closed 9 years ago

#209 closed enhancement (fixed)

Range constructor in rasql

Reported by: Dimitar Misev Owned by: Bidesh Thapaliya
Priority: critical Milestone: 9.1
Component: qlparser Version: 8.3
Keywords: Cc: Peter Baumann, Alex Dumitru, Vlad Merticariu
Complexity: Very Hard

Description (last modified by Dimitar Misev)

rasql is missing dedicated language feature for dynamically constructing multi-channel MDDs. A range constructor expression in WCPS, e.g.

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

which is not too intuitive and potentially slower than a dedicated solution like

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

The only problem with the above is that there is a clash, as the same construct would be used to also represent struct constants like {1c,0c,0c,..}. Parsing shouldn't be a problem because in one case we have a list of MDD expressions while in the other it's a list of numbers, but that the same construct leads to different results (MDD vs. constant) based on the context may be confusing?

Change History (8)

comment:1 by Dimitar Misev, 12 years ago

Description: modified (diff)

comment:2 by Peter Baumann, 12 years ago

Milestone: Future

comment:3 by Dimitar Misev, 11 years ago

Complexity: Very Hard
Owner: set to Veranika Liaukevich
Status: newassigned

comment:4 by Dimitar Misev, 10 years ago

Owner: changed from Veranika Liaukevich to Bidesh Thapaliya

comment:5 by Bidesh Thapaliya, 10 years ago

patch submitted.

comment:6 by Dimitar Misev, 10 years ago

Besides mdds as arguments, the range constructor should allow also scalars, which internally are expanded to mdds (equivalent to the first mdd in spatial domain.

E.g.

select { rgb.red, rgb.blue, 5c } from rgb

5c indicates that the third band of the result should be set to all 5.

comment:7 by Dimitar Misev, 10 years ago

Cc: Alex Dumitru Vlad Merticariu added
Milestone: Future9.1
Priority: majorcritical

The range constructor seems to have a serious memory leak, especially with the SWITCH statement.

comment:8 by Dimitar Misev, 9 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.