Opened 4 years ago

Closed 21 months ago

#209 closed enhancement (fixed)

Range constructor in rasql

Reported by: dmisev Owned by: bthapaliya
Priority: critical Milestone: 9.1
Component: qlparser Version: 8.3
Keywords: Cc: pbaumann, mdumitru, vmerticariu
Complexity: Very Hard

Description (last modified by dmisev)

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

  • Description modified (diff)

comment:2 Changed 4 years ago by pbaumann

  • Milestone set to Future

comment:3 Changed 3 years ago by dmisev

  • Complexity set to Very Hard
  • Owner set to vliaukevich
  • Status changed from new to assigned

comment:4 Changed 3 years ago by dmisev

  • Owner changed from vliaukevich to bthapaliya

comment:5 Changed 3 years ago by bthapaliya

patch submitted.

comment:6 Changed 3 years ago by dmisev

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 Changed 22 months ago by dmisev

  • Cc mdumitru vmerticariu added
  • Milestone changed from Future to 9.1
  • Priority changed from major to critical

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

comment:8 Changed 21 months ago by dmisev

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.