7 | | SELECT encode((c.b1)[0:10,0:20,0], "PNG") FROM irr_cube_2 AS c' |
8 | | rasql: rasdaman query tool v1.0, rasdaman v9.2.1-gff4f8d4 -- generated on 10.05.2016 14:57:56. |
| 4 | rasql -q 'create type waxlake42_1470639570867_735_base as (b1 char, b2 char, b3 char)' --user rasadmin --passwd rasadmin |
| 5 | }}} |
| 6 | create array type: |
| 7 | {{{ |
| 8 | rasql -q 'create type waxlake42_1470639570867_735_mdd as waxlake42_1470639570867_735_base mdarray [ x, y ]' --user rasadmin --passwd rasadmin |
| 9 | }}} |
| 10 | create set type: |
| 11 | {{{ |
| 12 | rasql -q 'create type waxlake42_1470639570867_735_set as set (waxlake42_1470639570867_735_mdd)' --user rasadmin --passwd rasadmin |
| 13 | }}} |
| 14 | create collection: |
| 15 | {{{ |
| 16 | rasql -q 'CREATE COLLECTION waxlake3 waxlake42_1470639570867_735_set' --user rasadmin --passwd rasadmin |
| 17 | }}} |
| 18 | insert data: |
| 19 | {{{ |
| 20 | rasql -q "INSERT INTO waxlake3 VALUES <[0:0,0:0] {0c,0c,0c}> " --user rasadmin --passwd rasadmin |
| 21 | }}} |
| 22 | result of dbinfo: |
| 23 | {{{ |
| 24 | rasql -q 'select dbinfo(c)from waxlake3 as c' --out string |
| 25 | }}} |
| 26 | {{{ |
| 27 | rasql: rasdaman query tool v1.0, rasdaman 9.5.0. |
10 | | Executing retrieval query... |
11 | | rasdaman error 370: Execution error 370 in line 1, column 17, near token .: Struct selector is not valid. |
| 29 | Executing retrieval query...ok |
| 30 | Query result collection has 1 element(s): |
| 31 | Result object 1: { |
| 32 | "oid": "696833", |
| 33 | "baseType": "marray <struct { char , char , char }>", |
| 34 | "tileNo": "1", |
| 35 | "totalSize": "3", |
| 36 | "tiling": { |
| 37 | "tilingScheme": "aligned", |
| 38 | "tileSize": "4194304", |
| 39 | "tileConfiguration": "[0:*,0:*]" |
| 40 | }, |
| 41 | "index": { |
| 42 | "type": "rpt_index", |
| 43 | "PCTmax": "4096", |
| 44 | "PCTmin": "2048" |
| 45 | } |
| 46 | } |
| 47 | rasql done. |
| 48 | }}} |
| 49 | result of referencing by band name: |
| 50 | {{{ |
| 51 | rasql -q 'select c.b1 from waxlake3 as c' --out string |
| 52 | }}} |
| 53 | {{{ |
| 54 | rasql: rasdaman query tool v1.0, rasdaman 9.5.0. |
| 55 | opening database RASBASE at localhost:7001...ok |
| 56 | Executing retrieval query...rasdaman error 370: Execution error 370 in line 1, column 9, near token .: Struct selector is not valid. |
15 | | If change to band index, it also can run with irr_cube_2 |
16 | | |
17 | | {{{ |
18 | | SELECT encode((c.0)[0:10,0:20,0], "PNG") FROM irr_cube_2 AS c |
19 | | }}} |
20 | | |
21 | | |
22 | | To reproduce: |
23 | | {{{ |
24 | | rasql -q "create collection a RGBSet" --user rasadmin --passwd rasadmin |
25 | | rasql -q 'insert into a values marray i in [0:1,0:1] values {0c,0c,0c}' --user rasadmin --passwd rasadmin |
26 | | rasql -q 'select c.red from a as c' |
27 | | }}} |
28 | | The last command should not throw an error. |
29 | | |
30 | | You have to look at where the error is thrown (grep for 370 in rasdaman and try to trace all places where it's thrown) and try to find the issue. |
31 | | |
32 | | It could be in the query language parser code, source:qlparser/lex.ll and source:qlparser/oql.yy |
| 61 | One can still reference the bands by c.0, c.1, c.2. |