Ticket #105 (closed enhancement: duplicate)

Opened 7 months ago

Last modified 6 months ago

Duplicate variables in BGPs can be handled in algebra

Reported by: pag Assigned to: pag
Priority: minor Milestone: SPARQL Query Engine
Component: Mulgara Version: 1.2.1
Keywords: Cc:

Description (Last modified by pag)

Duplicate variables in a basic graph pattern are currently managed in StatementStoreDuplicateResolution. This is an excessively complex operation, trying to manage numerous corner cases, and yet it is completely unnecessary.

Instead, successive instances of the same variable should be renamed, and the constraint should be conjoined with itself with the repeated variables rotated around.

e.g. for 2 variables:

{?x ?x ?y} becomes: {?x ?x2 ?y} AND {?x2 ?x ?y}
{?x ?y ?x} becomes: {?x ?y ?x2} AND {?x2 ?y ?x}
{?y ?x ?x} becomes: {?y ?x ?x2} AND {?y ?x2 ?x}

and for 3 variables:

{?x ?x ?x} becomes: {?x ?x2 ?x3} AND {?x3 ?x ?x2} AND {?x2 ?x3 ?x}

The values of ?x2 and ?x3 can always be ignored since they are identical to ?x.

Change History

05/07/08 23:07:28 changed by pag

  • description changed.

05/07/08 23:08:25 changed by pag

  • description changed.

05/30/08 19:06:53 changed by pag

  • status changed from new to closed.
  • resolution set to duplicate.

See ticket #120