Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Altered Behaviour Of Parent Triple Maps without Join Condition With Major Version 7 #241

Open
tobiasschweizer opened this issue Aug 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@tobiasschweizer
Copy link

Hi @DylanVanAssche,

I have just tried v7 release of rmlmapper and my unit tests broke ;-)

<#ProjectMonetaryAmount> a rr:TriplesMap;
  rml:logicalSource <#LogicalSourceGrant> ;

  rr:subjectMap [
    rr:termType rr:BlankNode ;
    rr:class schema:MonetaryAmount ;
    rr:template "mybn{number}_{index}"
  ] ;

...

rr:predicateObjectMap [
    rr:predicate schema:amount ;
    rr:objectMap [
       rr:parentTriplesMap <#ProjectMonetaryAmount> ;
    ]
  ] ;

The bnodes were not matching any more after switching from v6.5.1 to v7.0.0.

I could fix it by adding a join condition. In my understanding, this should not be required since the same logical source is used.

  rr:predicateObjectMap [
    rr:predicate schema:amount ;
    rr:objectMap [
       rr:parentTriplesMap <#ProjectMonetaryAmount> ;
       rr:joinCondition [
        rr:child "number";
        rr:parent "number";
      ];
    ]
  ] ;

Here are the full mapping, a test data file and the results with the non matching bnodes:

Maybe this is related to

Optimization for self-joins without join conditions (fixes Gitlab issue 275)

Let me know if you need more info.

Best,

Tobias

@DylanVanAssche
Copy link
Contributor

This might be a result of that optimization... The spec says that it should not be needed to have a join condition with the same logical source. Thanks for the example, this should be integrated in the unittest framework so we can avoid this case in the future.

@DylanVanAssche DylanVanAssche added the bug Something isn't working label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants