gmantele / vollt

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

Column aliases are simplified when prefixed with a table name #154

Open ManonMarchand opened 7 months ago

ManonMarchand commented 7 months ago

Hi Greg,

The following query

SELECT TOP 1 qual AS "flux.qual" FROM flux

Returns a column qual where flux. is removed. This is an unexpected behaviour as this alias is not incorrect.

Looks like this comes from the rule for simplificationNeeded here:

https://github.com/gmantele/vollt/blob/1481ccb5e7a573725d1ed38b620a466221b171ce/src/tap/metadata/TAPColumn.java#L194

Where the regexp could be something along "[^"]+" ?

gmantele commented 7 months ago

This happens only when the alias prefix (flux) is a table name.

ManonMarchand commented 7 months ago

Yes! And it it case sensitive: if I do

SELECT TOP 1 qual AS "FluX.qual" FROM flux

Then there is no issue (but my alias is ugly)