Class ReorderTransformationHDT

  • All Implemented Interfaces:
    org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformation

    public class ReorderTransformationHDT
    extends org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformationSubstitution
    Reorders the Triple Patterns of a BGP by using statistics directly fetched from the dataset. At query optimization phase, when planning index-joins, some variables are known to be bound at some stage, but the actual values are unknown. In this case it uses predefined typical behaviour for RDF, using independent histograms for S/P/O, inspired by Jena's FixedReorder.
    Author:
    mario.arias
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformationSubstitution

        org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformationSubstitution.DefaultChoice
    • Field Summary

      Fields 
      Modifier and Type Field Description
      org.apache.jena.sparql.engine.optimizer.StatsMatcher matcher  
      static int MultiTermMax
      Maximum value for a match involving two terms.
      static int MultiTermSampleSize
      The number of triples used for the base scale
      • Fields inherited from class org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformationSubstitution

        log
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected double weight​(org.apache.jena.sparql.engine.optimizer.reorder.PatternTriple pt)  
      • Methods inherited from class org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformationSubstitution

        chooseAll, chooseNext, defaultChoice, defaultWeight, modifyComponents, reorder, reorder, reorderIndexes, update, update
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MultiTermMax

        public static final int MultiTermMax
        Maximum value for a match involving two terms.
        See Also:
        Constant Field Values
      • MultiTermSampleSize

        public static final int MultiTermSampleSize
        The number of triples used for the base scale
        See Also:
        Constant Field Values
      • matcher

        public final org.apache.jena.sparql.engine.optimizer.StatsMatcher matcher
    • Constructor Detail

      • ReorderTransformationHDT

        public ReorderTransformationHDT​(HDTGraph graph,
                                        HDTStatistics hdtStatistics)
    • Method Detail

      • weight

        protected double weight​(org.apache.jena.sparql.engine.optimizer.reorder.PatternTriple pt)
        Specified by:
        weight in class org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformationSubstitution