Opened 4 years ago

Closed 4 years ago

#2302 closed defect (duplicate)

Rasql - cannot use DEM as collection alias

Reported by: Bang Pham Huu Owned by: apercov
Priority: major Milestone: 10.0
Component: server Version: 9.8
Keywords: Cc: Dimitar Misev, Vlad Merticariu, Peter Baumann
Complexity: Medium

Description

This will cause problem when one uses DEM or dem as collection iterator.

rasql -q 'select encode(DEM, "png") from test_mr as DEM' --out string
 error 300: Parsing error 300 in line 1, column 18: Unexpected name ,.

Change History (8)

comment:1 by Vlad Merticariu, 4 years ago

Resolution: invalid
Status: assignedclosed

DEM is a function name (just like PNG(…)).

DEM LRPAR generalExp COMMA StringLit RRPAR

{

$$ = new QtConversion( $3, QtConversion::QT_TODEM, $5.value );
$$→setParseInfo( *($1.info) );
parseQueryTree→removeDynamicObject( $3 );
parseQueryTree→addDynamicObject( $$ );
FREESTACK($1)
FREESTACK($2)
FREESTACK($4)
FREESTACK($6)

}

comment:2 by Peter Baumann, 4 years ago

…where do I find this information as a user? Do we have a list of all reserved words anywhere?

Also, the error message is inadequate: "unexpected name (!) ,". Ideally, a user would see aka "Error: Rserved word forbidden in this position."

comment:3 by Vlad Merticariu, 4 years ago

The list of reserved tokens is in qlparser/lex.ll. We could add to the docs in an appendix similar to https://doc.rasdaman.org/04_ql-guide.html#appendix-a-rasql-grammar

comment:4 by Peter Baumann, 4 years ago

yes, could be generated automatically for rasql. But still needs transfer to WCPS, likely human effort saying "in addition to WCPS keywords, the following are reserved".

comment:5 by Vlad Merticariu, 4 years ago

WCPS comes with its own list of tokens, IMO that would fit better under https://doc.rasdaman.org/05_geo-services-guide.html#wcps, wdyt?

comment:6 by Bang Pham Huu, 4 years ago

Resolution: invalid
Status: closedreopened

comment:7 by apercov, 4 years ago

Closing this ticket. Documentation ticket #2303 opened instead

comment:8 by apercov, 4 years ago

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