Proposal for ISSUE-32, curly braces in joinCondition

This is a proposal to resolve ISSUE-32 [1], which is about the use of curly braces in rr:joinCondition. The definition of rr:joinCondition [2] allows syntax like this:

   [] rr:parentTriplesMap <#TriplesMap1>;
      rr:joinCondition "{childAlias.}deptno = {parentAlias.}deptno".

Note that {childAlias.} and {parentAlias.} are fixed “magic” strings, and not placeholders for “real” table names. The {childAlias.} refers to the current map's logical table. The {parentAlias.} refers to the logical table of the map that rr:parentTriplesMap points to.

My proposal is to replace the “microsyntax” by explicit RDF structure:

   [] rr:parentTriplesMap <#TriplesMap1>;
      rr:joinChild "deptno";
      rr:joinParent "deptno";

However, we still have to handle the case where the join is across multiple columns. I propose to do it by using RDF lists, like this:

   [] rr:parentTriplesMap <#TriplesMap1>;
      rr:joinChild ("col1","col2");
      rr:joinParent ("col1","col2");

This means the range of rr:joinChild and rr:joinParent would include both strings (logical column names) and rdf:Lists. If someone objects violently to this, then another proposal could look like this:

   [] rr:parentTriplesMap <#TriplesMap1>;
      rr:join "col1,col1", "col2,col2";

This pairs them up along the other dimension, and re-introduces some “microsyntax”, but at least doesn't involve curly braces ;-)


PROPOSAL: Resolve ISSUE-32 as suggested in this message, with the "col1" syntax for one column, and ("col1","col2") for two columns.



Received on Tuesday, 10 May 2011 19:35:12 UTC