java.lang.Object
se.liu.ida.hefquin.engine.queryproc.impl.loptimizer.heuristics.utils.JoinAnalyzer

public class JoinAnalyzer extends Object
  • Constructor Details

    • JoinAnalyzer

      public JoinAnalyzer()
  • Method Details

    • countNumOfJoinsWithSameSub

      public static int countNumOfJoinsWithSameSub(QueryAnalyzer plan)
      Count number of different types of joins for a given plan; - s-s joins: subject-subject - o-o joins: object-object joins - chain joins: object-subject and subject-object joins - unusual joins: subject-predicate, predicate-object, predicate-predicate joins
    • countNumOfJoinsWithSameObj

      public static int countNumOfJoinsWithSameObj(QueryAnalyzer plan)
    • countNumOfChainJoins

      public static int countNumOfChainJoins(QueryAnalyzer plan)
    • countNumOfUnusualJoins

      public static int countNumOfUnusualJoins(QueryAnalyzer plan)
    • countNumOfJoinsWithSameSub

      public static int countNumOfJoinsWithSameSub(QueryAnalyzer plan_l, QueryAnalyzer plan_r)
      Count number of different types of joins between two given sub-plans
    • countNumOfJoinsWithSameObj

      public static int countNumOfJoinsWithSameObj(QueryAnalyzer plan_l, QueryAnalyzer plan_r)
    • countNumOfChainJoins

      public static int countNumOfChainJoins(QueryAnalyzer plan_l, QueryAnalyzer plan_r)
    • countNumOfUnusualJoins

      public static int countNumOfUnusualJoins(QueryAnalyzer plan_l, QueryAnalyzer plan_r)
    • countDuplicates

      public static int countDuplicates(List<org.apache.jena.graph.Node> vars)
      Sum the number of duplicates for each variable e.g., if the input contains three ?s variable, the number of duplicates is 2
    • countNumOfJoinPairs

      public static int countNumOfJoinPairs(List<org.apache.jena.graph.Node> vars_a, List<org.apache.jena.graph.Node> vars_b)
      For each occurrence of a variable in the second list, check whether there exists a matching partner (the same variable) in the first list. If exists, increase the "numOfJoinPairs" by 1, and remove the matched variable (instance) from the first list. Otherwise, move to the next variable. Repeat this process until all occurrences of variables in the second list have been checked. Note: If a variable occurs multiple times, each occurrence is counted in join pairs only once.