Opened 13 years ago

Closed 9 years ago

#132 closed defect (fixed)

Selecting struct component by name fails

Reported by: Dimitar Misev Owned by: uadhikari
Priority: major Milestone: 9.0.x
Component: qlparser Version: 8.3
Keywords: Cc: Peter Baumann, Marcus Sen
Complexity: Medium

Description (last modified by Dimitar Misev)

select c.red 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(c.red) from rgb as c

To reproduce the following script can be used:

#!/bin/bash

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;
EOF

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 by Dimitar Misev, 13 years ago

Description: modified (diff)

comment:2 by Peter Baumann, 12 years ago

Milestone: Future

comment:3 by Marcus Sen, 11 years ago

Complexity: Very Hard

Is this really rasgeo component?

comment:4 by Marcus Sen, 11 years ago

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

comment:5 by Dimitar Misev, 11 years ago

Complexity: Very HardMedium
Component: rasgeoqlparser

comment:6 by Dimitar Misev, 11 years ago

Description: modified (diff)
Milestone: Future9.0.x
Owner: set to uadhikari
Status: newassigned

comment:7 by uadhikari, 11 years ago

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.

Version 0, edited 11 years ago by uadhikari (next)

comment:8 by Marcus Sen, 11 years ago

Cc: Marcus Sen added

comment:9 by Dimitar Misev, 11 years ago

Resolution: invalid
Status: assignedclosed

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

comment:10 by Dimitar Misev, 9 years ago

Resolution: invalid
Status: closedreopened

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

$ rasql -q 'select avg_cells(c.red) 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 by Dimitar Misev, 9 years ago

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