Opened 6 years ago

Closed 22 months ago

#132 closed defect (fixed)

Selecting struct component by name fails

Reported by: dmisev Owned by: uadhikari
Priority: major Milestone: 9.0.x
Component: qlparser Version: 8.3
Keywords: Cc: pbaumann, mase
Complexity: Medium

Description (last modified by dmisev)

select from multi as c

fails with "Struct selector is not valid." when a custom struct type is used, while selecting by number works:

select c.0 from multi as c

selecting from an RGBSet collection also works:

select sdom( from rgb as c

To reproduce the following script can be used:


cat > /tmp/types.dl << EOF
struct mod { float Surface_Temperature, Surface_Pressure, Total_Ozone, Water_Vapor; };
typedef marray <mod, 2> arrayMod07;
typedef set<arrayMod07> setMod07;

rasdl -r /tmp/types.dl -i > /dev/null 2>&1

r="rasql --user rasadmin --passwd rasadmin"

$r -q 'drop collection test' > /dev/null 2>&1
$r -q 'create collection test setMod07'
$r -q 'insert into test values marray i in [0:2,0:2] values {0.5f,1.0f,2.0f,4.0f}'

$r -q 'select csv(test.Surface_Temperatur) from test' --out string

Change History (11)

comment:1 Changed 6 years ago by dmisev

  • Description modified (diff)

comment:2 Changed 5 years ago by pbaumann

  • Milestone set to Future

comment:3 Changed 3 years ago by mase

  • Complexity set to Very Hard

Is this really rasgeo component?

comment:4 Changed 3 years ago by mase

I seem to have accidentally set the complexity to Very Hard. I don't know what it was before.

comment:5 Changed 3 years ago by dmisev

  • Complexity changed from Very Hard to Medium
  • Component changed from rasgeo to qlparser

comment:6 Changed 3 years ago by dmisev

  • Description modified (diff)
  • Milestone changed from Future to 9.0.x
  • Owner set to uadhikari
  • Status changed from new to assigned

comment:7 Changed 3 years ago by uadhikari

The error reproduction script has a typo.
In "$r -q 'select csv(test.Surface_Temperatur) from test' --out string"

'test.Surface_Temperature' should have been used.

The query works after the typo fix.

Last edited 3 years ago by uadhikari (previous) (diff)

comment:8 Changed 3 years ago by mase

  • Cc mase added

comment:9 Changed 3 years ago by dmisev

  • Resolution set to invalid
  • Status changed from assigned to closed

Wow, can't believe there was a typo :) Great, we can close this!

comment:10 Changed 2 years ago by dmisev

  • Resolution invalid deleted
  • Status changed from closed to reopened

There seems to be again some issues with the struct selector, e.g.

$ rasql -q 'select avg_cells( from rgb as c' --out string
rasql: rasdaman query tool v1.0, rasdaman  -- generated on 31.08.2015 23:20:33.
opening database RASBASE at localhost:7001...ok
Executing retrieval query...rasdaman error 370: Execution error 370 in line 1, column 19, near token .: Struct selector is not valid.
aborting transaction...ok
rasql done.

comment:11 Changed 22 months ago by dmisev

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