kg-construct / rml-core

RML-Core: Main features for RDF generation with RML
https://w3id.org/rml/core/spec
Creative Commons Attribution 4.0 International
12 stars 8 forks source link

Define ill-formed joins in the spec #124

Open SimonBin opened 2 months ago

SimonBin commented 2 months ago

Currently the case for example in https://github.com/kg-construct/rml-core/blob/dd2c79428b5ae1702a3f1f4104b7b7977db32728/test-cases/RMLTC0009a-MySQL/resource.sql

CREATE TABLE student (
  Sport VARCHAR(50),
);
CREATE TABLE sport (
  ID INTEGER,
);
joinCondition: [ rml:parent "ID"; rml:child "Sport" ]

Already fixed in PostgreSQL #115

IMO it should be illegal in RML even if MySQL happens to so accept it

raised by @aklakan in the chat

SimonBin commented 2 months ago

nb. the source according to @pmaria https://www.w3.org/2001/sw/rdb2rdf/test-cases/#D009-2tables1primarykey1foreignkey has the correct types

DylanVanAssche commented 3 weeks ago

Thanks for the issue!

I also agree that ill-formed joins must be rejected. We need to define such 'ill-formed joins' as they can also happen for example in XML or JSON. What happens then if you have a string "5" and integer 5?

RML-Core should define this as joins are part of RML-Core regarding the ReferenceObjectMap and also RML-Logical-View.

CC: @pmaria @andimou @elsdvlee

dachafra commented 3 weeks ago

I think this issue should be fixed in #78, what do you think @elsdvlee @pmaria?

pmaria commented 3 weeks ago

I think this issue should be fixed in #78, what do you think @elsdvlee @pmaria?

@dachafra yes we should be able to incorporate it in that PR eventually. First we need to do some more fundamental (re)writing.