RMLio / yarrrml-parser

A YARRRML parser library and CLI in Javascript
MIT License
41 stars 17 forks source link

Equal function ignores mapping in parameters #155

Open pheyvaer opened 2 years ago

pheyvaer commented 2 years ago

Issue type: :bug: Bug

Description

Equal function ignores mapping in parameters.

- p: ex:test
  o: 
    mapping: projects
    condition:
      function: equal 
      parameters: 
        - [str1, $(id), o]
        - [str2, $(employee-id), s]

In [str1, $(id), o] the third element o is ignored. It's always s. In [str2, $(employee-id), s] the third element s is ignored. It's always o.

Steps

The two following snippets return the same RML. while the child and parent of the join condition should be switched.

- p: ex:test
  o: 
    mapping: projects
    condition:
      function: equal 
      parameters: 
        - [str1, $(id), o]
        - [str2, $(employee-id), s]
- p: ex:test
  o: 
    mapping: projects
    condition:
      function: equal 
      parameters: 
        - [str1, $(id), s]
        - [str2, $(employee-id), o]

Environment

v1.3.3 of the parser.