0 votes
141 views
For some reason some objIds in cross-match tables for SDSS are negative, which does not make sense. Is it a bug?

An example:

select * from  ls_dr8.x1p5__tractor_primary_n__sdss_dr16__specobj where id1= 8797213156704970
asked May 30, 2021 by minzastro (340 points) | 141 views

1 Answer

0 votes

This is not a bug, but a consequence of the integer representation.  The specObjID values in Data Lab tables are cast as signed integers, because this is what the database supports.  However, some specObjID values are larger than 263, therefore these will be negative in a signed representation.

If you need to work with unsigned values of specObjID, you will have to use a more advanced query interface, such as the Data Lab query client.

answered Jun 2, 2021 by baweaver (300 points)
Pity that this is a DB limitation. Can't you store specObjID as a string in that case? It is a bit inconvenient to use these data in combination with external SDSS tables, when IDs do not match...
As I mentioned, if you need to work with unsigned values of specObjID, you certainly can, you will have to use a more advanced query interface, such as the Data Lab query client.  Is that what you are specifically asking for here?

359 questions

372 answers

385 comments

2,427 users

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