Class QueryPlanProperty

java.lang.Object
se.liu.ida.hefquin.engine.queryplan.info.QueryPlanProperty

public class QueryPlanProperty extends Object
Represents a particular property of a query plan as determined and used during query planning. Typical examples of such properties are the (estimated) cardinality of the query result produced by the plan and the (estimated) number of requests that will be issued when running the plan.

In addition to its type (as captured by the QueryPlanProperty.Type class) and its value, each such property has a QueryPlanProperty.Quality score which indicates how certain the value is.

  • Field Details

    • CARDINALITY

      public static QueryPlanProperty.Type CARDINALITY
      A property of this type specifies the (potentially estimated) number of solution mappings that can be expected from the corresponding query plan.
    • MAX_CARDINALITY

      public static QueryPlanProperty.Type MAX_CARDINALITY
      A property of this type specifies the (potentially estimated) maximum number of solution mappings that can be expected from the corresponding query plan.
    • MIN_CARDINALITY

      public static QueryPlanProperty.Type MIN_CARDINALITY
      A property of this type specifies the (potentially estimated) minimum number of solution mappings that can be expected from the corresponding query plan.
    • type

      protected final QueryPlanProperty.Type type
    • value

      protected final int value
    • quality

      protected final QueryPlanProperty.Quality quality
  • Constructor Details

    • QueryPlanProperty

      public QueryPlanProperty(QueryPlanProperty.Type type, int value, QueryPlanProperty.Quality quality)
      Creates a new QueryPlanProperty with the given type, value, and quality score.
      Parameters:
      type - - the type of the property to be created
      value - - the value of the property to be created
      quality - - the quality score of the property to be created
  • Method Details

    • cardinality

      public static QueryPlanProperty cardinality(int value, QueryPlanProperty.Quality quality)
      Creates a property of type CARDINALITY.
      Parameters:
      value - - the value to be used for the created property
      quality - - the quality of the given value
      Returns:
      the created property
    • maxCardinality

      public static QueryPlanProperty maxCardinality(int value, QueryPlanProperty.Quality quality)
      Creates a property of type MAX_CARDINALITY.
      Parameters:
      value - - the value to be used for the created property
      quality - - the quality of the given value
      Returns:
      the created property
    • minCardinality

      public static QueryPlanProperty minCardinality(int value, QueryPlanProperty.Quality quality)
      Creates a property of type MIN_CARDINALITY.
      Parameters:
      value - - the value to be used for the created property
      quality - - the quality of the given value
      Returns:
      the created property
    • copyWithReducedQuality

      public static QueryPlanProperty copyWithReducedQuality(QueryPlanProperty p)
      Creates a copy of the given property (its type and its value) with a reduced quality score.
      Parameters:
      p - - the property to be copied
      Returns:
      the copy
    • getType

      public QueryPlanProperty.Type getType()
      Returns the type of this property.
      Returns:
      the type of this property
    • getValue

      public int getValue()
      Returns the value of this property.
      Returns:
      the value of this property
    • getQuality

      public QueryPlanProperty.Quality getQuality()
      Returns the quality score of this property.
      Returns:
      the quality score of this property
    • toString

      public String toString()
      Overrides:
      toString in class Object