gmantele / vollt

Java libraries implementing the IVOA protocol: ADQL, UWS and TAP
http://cdsportal.u-strasbg.fr/taptuto/
29 stars 28 forks source link

table translation #150

Closed vforchi closed 7 months ago

vforchi commented 8 months ago

https://github.com/gmantele/vollt/blob/71a08860df4231ffc330a927c8a0bdd2f9228030/ADQLLib/src/adql/db/DefaultDBTable.java#L222

I am trying to port to adql-2.1, and I am having some problems with the JDBCTranslator. I think I pinpointed it to here: is this the expected behaviour, or should it be normalize(name)?

My use case is the following: I create the table with new DefaultDBTable(null, null, 'TAP_SCHEMA', 'TAP_SCHEMA', 'tables', 'tables') And what happens is that the constructor invokes the super constructor, which sets dbName to 'tables', and then dbName ends up in adqlCatalogName, and the table is translated to tables.TAP_SCHEMA.tables instead of TAP_SCHEMA.tables.

It seems to work with var dbTable = new DefaultDBTable(null, schemaName, name);, but why all these different constructors?

gmantele commented 8 months ago

You are perfectly right. This is a bug. Clearly, it should be normalize(name).

gmantele commented 7 months ago

Fixed in branch adql2.1. Once this branch will be complete, it will be merged into master.