Package org.apache.drill.exec.resolver
Class ResolverTypePrecedence
java.lang.Object
org.apache.drill.exec.resolver.ResolverTypePrecedence
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.apache.drill.shaded.guava.com.google.common.graph.ImmutableValueGraph<TypeProtos.MinorType,
Float> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
computeCost
(TypeProtos.MinorType fromType, TypeProtos.MinorType toType) Searches the implicit casting graph for the path of least total cost using Dijkstra's algorithm.
-
Field Details
-
CAST_GRAPH
public static final org.apache.drill.shaded.guava.com.google.common.graph.ImmutableValueGraph<TypeProtos.MinorType,Float> CAST_GRAPH
-
-
Constructor Details
-
ResolverTypePrecedence
public ResolverTypePrecedence()
-
-
Method Details
-
computeCost
Searches the implicit casting graph for the path of least total cost using Dijkstra's algorithm.- Parameters:
fromType
- type to cast fromtoType
- type to cast to- Returns:
- a positive float path cost or +∞ if no path exists
-