Skip to content

cadc-tap-server: use explicit long and double format objects#232

Merged
pdowler merged 1 commit intoopencadc:mainfrom
pdowler:main
Nov 25, 2025
Merged

cadc-tap-server: use explicit long and double format objects#232
pdowler merged 1 commit intoopencadc:mainfrom
pdowler:main

Conversation

@pdowler
Copy link
Member

@pdowler pdowler commented Nov 25, 2025

to extract values from jdbc driver

reason: if the select list in a query contains expressions (algebraic, case statements, etc) it is not possible to infer the right type, but valuable to get close, so the ADQL parser infers long or double when it can... however, the jdbc driver's ResultSet.getObject might return something different (Integer instead of Long) and cause a ClassCastException when the TableWriter tries to write the value!

So this just makes sure that long and double (from ADQL type inference) will extract the right types. As a aside efefct, it will hide a mismatch between the database and tap_schema in cases (eg database uses int but tap_schema says long).

@pdowler pdowler merged commit 21485b3 into opencadc:main Nov 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants