Class GenericPlanNode
java.lang.Object
org.eclipse.rdf4j.query.explanation.GenericPlanNode
This is an experimental feature. The interface may be changed, moved or potentially removed in a future release.
The interface is used to implement query explanations (query plan)
- Since:
- 3.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private Double
private final String
private static final String
private Boolean
private List
<GenericPlanNode> private static final int
private Long
private Double
private static final String[]
private Boolean
private Double
private String
private static final String
private static final AtomicLong
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlans
(GenericPlanNode... children) private void
Join nodes can use various algorithms for joining data.The cost estimate that the query planner calculated for this node.private String
getHumanReadable
(int prettyBoxDrawingType) getID()
private static double
getMaxResultSizeActual
(GenericPlanNode genericPlanNode) private static double
getMaxSelfTime
(GenericPlanNode genericPlanNode) private static double
getMaxTotalTime
(GenericPlanNode genericPlanNode) getPlans()
private String
getProportionalRedColor
(Double max, Double value) private String
getProportionalRedColor
(Double max, Long value) The actual number of results that this node produced while the query was executed.The number of results that this node was estimated to produce.The time that this node used by itself (eg.The total time in milliseconds that this node-tree (all children and so on) used while the query was executed.getType()
void
setAlgorithm
(String algorithm) void
setCostEstimate
(Double costEstimate) void
setNewScope
(boolean newScope) void
setPlans
(List<GenericPlanNode> plans) void
setResultSizeActual
(Long resultSizeActual) void
setResultSizeEstimate
(Double resultSizeEstimate) void
setTimedOut
(Boolean timedOut) void
setTotalTimeActual
(Double totalTimeActual) void
toDot()
private String
toDotInternal
(double maxResultSizeActual, double maxTotalTime, double maxSelfTime) private static String
toHumanReadableNumber
(Double number) private static String
toHumanReadableNumber
(Long number) private static String
toHumanReadableTime
(Double millis) toString()
Human readable string.
-
Field Details
-
UNKNOWN
- See Also:
-
uniqueIdPrefix
-
uniqueIdSuffix
-
spoc
-
newLine
-
id
-
type
-
timedOut
-
costEstimate
-
resultSizeEstimate
-
resultSizeActual
-
totalTimeActual
-
newScope
-
algorithm
-
plans
-
prettyBoxDrawingType
private static final int prettyBoxDrawingType- See Also:
-
-
Constructor Details
-
GenericPlanNode
public GenericPlanNode() -
GenericPlanNode
-
-
Method Details
-
getType
-
setType
-
getPlans
-
setPlans
-
addPlans
-
getCostEstimate
The cost estimate that the query planner calculated for this node. Value has no meaning outside of this explanation and is only used to compare and order the nodes in the query plan.- Returns:
- a cost estimate as a double value
-
setCostEstimate
-
getResultSizeEstimate
The number of results that this node was estimated to produce.- Returns:
- result size estimate
-
setResultSizeEstimate
-
getResultSizeActual
The actual number of results that this node produced while the query was executed.- Returns:
- number of results that this query produced
-
setResultSizeActual
-
getTotalTimeActual
The total time in milliseconds that this node-tree (all children and so on) used while the query was executed.- Returns:
- time in milliseconds that was used to execute the query
-
setTotalTimeActual
-
setTimedOut
-
getTimedOut
-
getSelfTimeActual
The time that this node used by itself (eg. totalTimeActual - sum of plans[0..n].totalTimeActual) -
isNewScope
- Returns:
- true if this node introduces a new scope
-
setNewScope
public void setNewScope(boolean newScope) -
getAlgorithm
Join nodes can use various algorithms for joining data.- Returns:
- the name of the algorithm.
-
setAlgorithm
-
toString
Human readable string. Do not attempt to parse this. -
getHumanReadable
- Parameters:
prettyBoxDrawingType
- for deciding if we should use single or double walled character for drawing the connectors between nodes in the query plan. Eg. ├ or ╠ and ─ o- Returns:
-
toHumanReadableNumber
- Returns:
- Human readable number. Eg. 12.1M for 1212213.4 and UNKNOWN for -1.
-
toHumanReadableNumber
- Returns:
- Human readable number. Eg. 12.1M for 1212213.4 and UNKNOWN for -1.
-
toHumanReadableTime
- Returns:
- Human readable time.
-
appendCostAnnotation
-
toDot
-
getMaxTotalTime
-
getMaxSelfTime
-
getMaxResultSizeActual
-
toDotInternal
-
getProportionalRedColor
-
getProportionalRedColor
-
getID
-