Opened 12 years ago

Last modified 9 years ago

#209 closed enhancement

Range constructor in rasql — at Version 1

Reported by: Dimitar Misev Owned by:
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 (1)

comment:1 by Dimitar Misev, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.