[ 
https://issues.apache.org/jira/browse/RYA-165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Chilton updated RYA-165:
------------------------------
    Description: 
The Fluo application that maintains PCJ indices currently creates complex 
visibility expressions that grow with every join that is part of the SPARQL 
query.

For example, if you create a PCJ for the following SPARQL:
{code}
SELECT ?customer ?worker ?city {
    ?customer <urn:talksTo> ?worker.
    ?worker <urn:livesIn> ?city.
    ?worker <urn:worksAt> <urn:BurgerJoint>.
}
{code}

And you insert the following Statements:
{code}
    Statement: "<urn:Alice> <urn:talksTo> <urn:Bob>" Visibility: "u"
    Statement: "<urn:Bob> <urn:livesIn> <urn:Happyville>" Visibility: "u"
    Statement: "<urn:Bob> <urn:worksAt> <urn:BurgerJoin>" Visibility: "u"
{code}

Then the following result will be exported to the PCJ index:
{code}
    BindingSet: {{"customer", "urn:Alice"}, {"worker","urn:Bob"}, {"city", 
"urn:Happyville"} Visibility: "(u&u)&u"
{code}

That visibility expression could also be represented as just "u". 
ColumnVisibility.flatten() calls may be used to iteratively simplify the 
logical expression, so update the Fluo application to do so before exporting 
the result.

  was:
The Fluo application that maintains PCJ indices currently creates complex 
visibility expressions that grow with every join that is part of the SPARQL 
query.

For example, if you create a PCJ for the following SPARQL:
{code}
SELECT ?customer ?worker ?city {
    ?customer <urn:talksTo> ?worker.
    ?worker <urn:livesIn> ?city.
    ?worker <urn:worksAt> <urn:BurgerJoint>.
}
{code}

And you insert the following Statements:
{code}
    Statement: "<urn:Alice> <urn:talksTo> <urn:Bob>" Visibility: "u"
    Statement: "<urn:Bob> <urn:livesIn> <urn:Happyville>" Visibility: "u"
    Statement: "<urn:Bob> <urn:worksAt> <urn:BurgerJoin>" Visibility: "u"
{code}

Then the following result will be exported to the PCJ index:
{code}
    BindingSet: {{"customer", "urn:Alice"}, {"worker","urn:Bob"}, {"city", 
"urn:Happyville"} Visibility: "(u&u)&u"
{code}


> Fluo PCJ maintenance should use ColumnVisibility.flatten() to simplify the 
> visibility expression
> ------------------------------------------------------------------------------------------------
>
>                 Key: RYA-165
>                 URL: https://issues.apache.org/jira/browse/RYA-165
>             Project: Rya
>          Issue Type: Bug
>          Components: dao
>            Reporter: Puja Valiyil 
>            Assignee: Kevin Chilton
>            Priority: Critical
>
> The Fluo application that maintains PCJ indices currently creates complex 
> visibility expressions that grow with every join that is part of the SPARQL 
> query.
> For example, if you create a PCJ for the following SPARQL:
> {code}
> SELECT ?customer ?worker ?city {
>     ?customer <urn:talksTo> ?worker.
>     ?worker <urn:livesIn> ?city.
>     ?worker <urn:worksAt> <urn:BurgerJoint>.
> }
> {code}
> And you insert the following Statements:
> {code}
>     Statement: "<urn:Alice> <urn:talksTo> <urn:Bob>" Visibility: "u"
>     Statement: "<urn:Bob> <urn:livesIn> <urn:Happyville>" Visibility: "u"
>     Statement: "<urn:Bob> <urn:worksAt> <urn:BurgerJoin>" Visibility: "u"
> {code}
> Then the following result will be exported to the PCJ index:
> {code}
>     BindingSet: {{"customer", "urn:Alice"}, {"worker","urn:Bob"}, {"city", 
> "urn:Happyville"} Visibility: "(u&u)&u"
> {code}
> That visibility expression could also be represented as just "u". 
> ColumnVisibility.flatten() calls may be used to iteratively simplify the 
> logical expression, so update the Fluo application to do so before exporting 
> the result.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to