Changes between Version 1 and Version 17 of Ticket #1342


Ignore:
Timestamp:
May 3, 2018, 12:32:24 PM (6 years ago)
Author:
Dimitar Misev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1342

    • Property Summary Rasql_Cannot use range name with different coveragesPetascope_Create correct base type with range fields when create collection
    • Property Priority majorcritical
    • Property Milestone 9.39.7
    • Property Owner changed from Sulav Timilsina to bbell
  • Ticket #1342 – Description

    v1 v17  
    1 irr_cube_2 coverage has 2 ranges (b1, b2)
    21
    3 but when use c.b1 or c.b2 it has error
    4 
    5 
     2create cell type:
    63{{{
    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.
     4rasql -q 'create type waxlake42_1470639570867_735_base as (b1 char, b2 char, b3 char)' --user rasadmin --passwd rasadmin
     5}}}
     6create array type:
     7{{{
     8rasql -q 'create type waxlake42_1470639570867_735_mdd as waxlake42_1470639570867_735_base mdarray [ x, y ]' --user rasadmin --passwd rasadmin
     9}}}
     10create set type:
     11{{{
     12rasql -q 'create type waxlake42_1470639570867_735_set as set (waxlake42_1470639570867_735_mdd)' --user rasadmin --passwd rasadmin
     13}}}
     14create collection:
     15{{{
     16rasql -q 'CREATE COLLECTION waxlake3 waxlake42_1470639570867_735_set' --user rasadmin --passwd rasadmin
     17}}}
     18insert data:
     19{{{
     20rasql -q "INSERT INTO waxlake3 VALUES <[0:0,0:0] {0c,0c,0c}> " --user rasadmin --passwd rasadmin
     21}}}
     22result of dbinfo:
     23{{{
     24rasql -q 'select dbinfo(c)from waxlake3 as c' --out string
     25}}}
     26{{{
     27rasql: rasdaman query tool v1.0, rasdaman 9.5.0.
    928opening database RASBASE at localhost:7001...ok
    10 Executing retrieval query...
    11 rasdaman error 370: Execution error 370 in line 1, column 17, near token .: Struct selector is not valid.
     29Executing retrieval query...ok
     30Query 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}
     47rasql done.
     48}}}
     49result of referencing by band name:
     50{{{
     51rasql -q 'select c.b1 from waxlake3 as c' --out string
     52}}}
     53{{{
     54rasql: rasdaman query tool v1.0, rasdaman 9.5.0.
     55opening database RASBASE at localhost:7001...ok
     56Executing retrieval query...rasdaman error 370: Execution error 370 in line 1, column 9, near token .: Struct selector is not valid.
    1257aborting transaction...ok
     58rasql done.
    1359}}}
    1460
    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
     61One can still reference the bands by c.0, c.1, c.2.