vollt
vollt copied to clipboard
UDF declaration with arrays (e.g. INTEGER[])
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: "<regular_identifier>(
?) <return_type>?", where <regular_identifier>="[a-zA-Z]+[a-zA-Z0-9_]", <return_type>=" -> <type_name>", ="(<regular_identifier> <type_name> (, <regular_identifier> <type_name>) )", <type_name> 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: "<regular_identifier>(?) <return_type>?", where <regular_identifier>="[a-zA-Z]+[a-zA-Z0-9_]", <return_type>=" -> <type_name>", ="(<regular_identifier> <type_name> (, <regular_identifier> <type_name>) )", <type_name> 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[]
.