gmantele / vollt

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

UDF declaration with arrays (e.g. INTEGER[]) #81

Open gmantele opened 6 years ago

gmantele commented 6 years ago

Whenever TOPCAT is pointed at http://dc.g-vo.org/tap, this WARNING-level log message is returned on stderr:

WARNING: Failed to parse UDF def "gavo_histogram(val REAL, lower REAL, upper REAL, nbins INTEGER) -> INTEGER[]": adql.parser.ParseException: Wrong function definition syntax! Expected syntax: "(?) ?", where ="[a-zA-Z]+[a-zA-Z0-9_]", =" -> ", ="( (, ))", should be one of the types described in the UPLOAD section of the TAP documentation. Examples of good syntax: "foo()", "foo() -> VARCHAR", "foo(param INTEGER)", "foo(param1 INTEGER, param2 DOUBLE) -> DOUBLE" (uk.ac.starlink.vo.AdqlValidator.createValidator) adql.parser.ParseException: Wrong function definition syntax! Expected syntax: "(?) ?", where ="[a-zA-Z]+[a-zA-Z0-9_]", =" -> ", ="( (, ))", should be one of the types described in the UPLOAD section of the TAP documentation. Examples of good syntax: "foo()", "foo() -> VARCHAR", "foo(param INTEGER)", "foo(param1 INTEGER, param2 DOUBLE) -> DOUBLE" at adql.db.FunctionDef.parse(FunctionDef.java:423) at uk.ac.starlink.vo.AdqlValidator.createValidator(AdqlValidator.java:163) ...

Presumably the issue is that ADQLlib doesn't like datatypes with square brackets, e.g. INTEGER[].