[ 
https://issues.apache.org/jira/browse/RYA-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978958#comment-15978958
 ] 

ASF GitHub Bot commented on RYA-260:
------------------------------------

Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/156#discussion_r112719552
  
    --- Diff: 
dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/utils/VisibilitySimplifier.java
 ---
    @@ -20,26 +20,48 @@
     
     import static java.util.Objects.requireNonNull;
     
    -import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
    -import edu.umd.cs.findbugs.annotations.NonNull;
    -
     import org.apache.accumulo.core.security.ColumnVisibility;
     
     import com.google.common.base.Charsets;
     
    +import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
    +import edu.umd.cs.findbugs.annotations.NonNull;
    +
     /**
      * Simplifies Accumulo visibility expressions.
      */
     @DefaultAnnotation(NonNull.class)
     public class VisibilitySimplifier {
     
         /**
    +     * Unions two visibility equations and then simplifies the result.
    +     *
    +     * @param vis1 - The first visibility equation that will be unioned. 
(not null)
    +     * @param vis2 - The other visibility equation that will be unioned. 
(not null)
    +     * @return A simplified form of the unioned visibility equations.
    +     */
    +    public static String unionAndSimplify(final String vis1, final String 
vis2) {
    +        requireNonNull(vis1);
    +        requireNonNull(vis2);
    +
    +        if(vis1.isEmpty()) {
    +            return vis2;
    +        }
    +
    +        if(vis2.isEmpty()) {
    +            return vis1;
    +        }
    +
    +        return simplify("(" + vis1 + ")&(" + vis2 + ")");
    +    }
    +
    --- End diff --
    
    The whitespace is as I intended, so I'm going to leave it as is.


> Add Aggregation support for Fluo/PCJ app
> ----------------------------------------
>
>                 Key: RYA-260
>                 URL: https://issues.apache.org/jira/browse/RYA-260
>             Project: Rya
>          Issue Type: New Feature
>            Reporter: Andrew Smith
>            Assignee: Kevin Chilton
>
> A user must be able to submit a PCJ query that contains the following 
> aggregation functions from SPARQL:
> * Sum
> * Count
> * Average
> * Min
> * Max
> This task does not include any aggregations that appear within a GroupBy 
> clause. We only need to support queries that have the aggregation within the 
> SELECT section.
> For example, the following query should be processed:
> {code}
> SELECT (avg(?price) as ?averagePrice)
> {
>     urn:BookA urn:price ?price.
> }
> {code}
> And the following query should not be processed because it requires a group 
> by:
> {code}
> SELECT ?title (avg(?price) as ?averagePrice)
> {
>     ?title urn:price ?price.
> }
> GROUP BY ?title
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to