While parsing the NATURAL JOIN in a query like
SELECT ivoid, access_url, name, ucd, description FROM rr.capability NATURAL
JOIN rr.interface NATURAL JOIN rr.table_column NATURAL JOIN rr.res_table WHERE
standard_id='ivo://ivoa.net/std/TAP' AND 1=ivo_hasword(table_description,
'quasar') AND ucd='phot.mag;em.opt.V'
the NATURAL JOIN part has NATURAL as an alias and only JOIN in the join_type
element:
["FROM"]=>
array(4) {
[0]=>
array(10) {
["expr_type"]=>
string(5) "table"
["table"]=>
string(13) "rr.capability"
["no_quotes"]=>
array(2) {
["delim"]=>
string(1) "."
["parts"]=>
array(2) {
[0]=>
string(2) "rr"
[1]=>
string(10) "capability"
}
}
["alias"]=>
array(4) {
["as"]=>
bool(false)
["name"]=>
string(7) "NATURAL"
["no_quotes"]=>
array(2) {
["delim"]=>
bool(false)
["parts"]=>
array(1) {
[0]=>
string(7) "NATURAL"
}
}
["base_expr"]=>
string(7) "NATURAL"
}
["hints"]=>
bool(false)
["join_type"]=>
string(4) "JOIN"
["ref_type"]=>
bool(false)
["ref_clause"]=>
bool(false)
["base_expr"]=>
string(13) "rr.capability"
["sub_tree"]=>
bool(false)
}
NATURAL should not end up as an alias
Original issue reported on code.google.com by adrian.p...@googlemail.com on 8 May 2014 at 1:43
Original issue reported on code.google.com by
adrian.p...@googlemail.com
on 8 May 2014 at 1:43