Skip to content

Default - GREL-functions not found or working #255

@achiminator

Description

@achiminator

With the idea of building RML support into VS Code and documenting it, I started testing the various default functions with the rmlmapper-7.3.1-r374-all.jar on windows with openjdk 23.0.2 2025-01-21. Unfortunately, I figured that some functions do not work correctly:

  • I cannot call any of the math functions, all of them (that I have tested) result in an error similar to: be.ugent.idlab.knows.functions.agent. functionInstantiation.exception.MethodNotFoundException: No suitable method 'abs' with matching parameter types found in class 'io.fno.grel.MathFunctions'.
  • Some functions not part of the math section have either similar not found errors or other problems, listed in the table below.

I cannot yet make sense of this behavior, as the rest of the functions (mainly string, array, some date functions and all boolean except of xor) work fine. Is it due to some missing dependencies that I should have installed our is it a bug?

I shared the mapping (rml and yarrrml source) and csv file for reproducing. I added a .txt so github would let me upload it to the issue here, please remove the .txt after download.

cars.csv, rml.ttl.txt, functionTest problems.yarrrml.txt

name part uri Problem
coalesce other http://users.ugent.be/~bjdmeest/function/grel.ttl#other_coalesce 13:27:42.037 [main] DEBUG b.u.i.k.functions.agent.AgentImpl   .getParameterValues(98) - finding value for parameter http://users.ugent.be/~bjdmeest/function/grel.ttl#p_any_rep_e 13:27:42.037 [main] WARN  b.u.i.k.f.a.d.DefaultDataTypeConverter.convert(21) - No DataTypeConverter found for class 'java.lang.String'; passing the object through 13:27:42.038 [main] ERROR be.ugent.rml.cli.Main               .run(442) - argument type mismatch
datePart date http://users.ugent.be/~bjdmeest/function/grel.ttl#date_datePart java.lang.IllegalArgumentException: argument type mismatch
diff date http://users.ugent.be/~bjdmeest/function/grel.ttl#date_diff be.ugent.idlab.knows.functions.agent.functionIntantiation.exception.MethodNotFoundException: No suitable method 'diff' with matching parameter types found in class 'io.fno.grel.DateFunctions'.
inc date http://users.ugent.be/~bjdmeest/function/grel.ttl#date_inc be.ugent.idlab.knows.functions.agent.functionIntantiation.exception.MethodNotFoundException: No suitable method 'inc' with matching parameter types found in class 'io.fno.grel.DateFunctions'.
reinterpret string http://users.ugent.be/~bjdmeest/function/grel.ttl#string_reinterpret Default functions input matches not with grel.ttl. Also: be.ugent.idlab.knows.functions.agent.functionIntantiation.exception.MethodNotFoundException: No suitable method 'reinterpret' with matching parameter types found in class 'io.fno.grel.StringFunctions'.
slice array http://users.ugent.be/~bjdmeest/function/grel.ttl#array_slice be.ugent.idlab.knows.functions.agent.functionIntantiation.exception.MethodNotFoundException: No suitable method 'slice' with matching parameter types found in class 'io.fno.grel.ArrayFunctions'.
splitByLengths string http://users.ugent.be/~bjdmeest/function/grel.ttl#string_splitByLengths be.ugent.idlab.knows.functions.agent.functionIntantiation.exception.MethodNotFoundException: No suitable method 'splitByLengths' with matching parameter types found in class 'io.fno.grel.StringFunctions'.
toNumber string http://users.ugent.be/~bjdmeest/function/grel.ttl#string_toNumber be.ugent.idlab.knows.functions.agent.functionIntantiation.exception.MethodNotFoundException: No suitable method 'toNumber' with matching parameter types found in class 'io.fno.grel.StringFunctions'.
toString string http://users.ugent.be/~bjdmeest/function/grel.ttl#string_toString Does not work as described in grel, has effect
xor boolean http://users.ugent.be/~bjdmeest/function/grel.ttl#boolean_xor ERROR b.u.r.f.DynamicMultipleRecordsFunctionExecutor.execute(87) - Function 'http://users.ugent.be/~bjdmeest/function/grel.ttl#boolean_xor' failed to execute with class java.lang.String cannot be cast to class java.lang.Boolean (java.lang.String and java.lang.Boolean are in module java.base of loader 'bootstrap')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions