0 votes

I'm still trying to crossmatch CatWISE2020 with VHS DR5. I have aborted my recent query because it neither times out nor it succeeds.

That's why I started with a new approach and tried to replicate the crossmatch query from one of the notebooks labeled "How to do an efficient crossmatch of a user table with a table in Data Lab" (notebooks-latest/04_HowTos/CrossmatchTables/).

My current query reads as follows:

query = '''SELECT c.*, vv.japermag3, vv.mergedclass
         FROM mydb://catwxvhs AS c
               SELECT v.ra2000, v.dec2000, v.japermag3, v.mergedclass
                        vhs_dr5.vhs_cat_v3 AS v
                        q3c_join(c.ra, c.dec, v.ra2000, v.dec2000, 0.0014)
                    ORDER BY
                        q3c_dist(c.ra, c.dec, v.ra2000, v.dec2000)
                    ASC LIMIT 1
               ) as vv ON true'''

Even though it's nearly the same query from the notebook, it unfortunately results in an error message and I've got no clue why that is. The error message says:

Retrieving error
Error: IllegalArgumentException: net.sf.jsqlparser.JSQLParserException JSQLParserException:  ParseException: Encountered "vv" at line 1, column 12.
Was expecting one of:
    <S_INTEGER> ...
    "?" ..

What have I done wrong? Why does the "vv" seem to be the problem? The original query uses "gg" for the outer part and "g" in the inner part. I just switched that to "vv" and "v".

by martinkb (720 points)
edited by 2231 | 131 views

2 Answers

0 votes
Is the missing 'SELECT' at the start of your query a cut-n-paste issue or is it really missing?
by datalab (20.8k points)
A bit of both. I wrongly copy&pasted from my notebook but 'SELECT' was also missing in my last attempt in the notebook. The "SELECT" has been there though in previous attempts and I also added it now back in but the error reads still the same.
0 votes
By the way, I also tried it with a synchronous query yesterday but had no luck. It times out after 600 seconds. It didn't have any problems with the 'INNER JOIN LATERAL' though.

Is this maybe another ADQL parser bug?
by martinkb (720 points)

427 questions

441 answers


644 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.