Class ResolverTypePrecedence

java.lang.Object
org.apache.drill.exec.resolver.ResolverTypePrecedence

public class ResolverTypePrecedence extends Object
  • 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

      public static float computeCost(TypeProtos.MinorType fromType, TypeProtos.MinorType toType)
      Searches the implicit casting graph for the path of least total cost using Dijkstra's algorithm.
      Parameters:
      fromType - type to cast from
      toType - type to cast to
      Returns:
      a positive float path cost or +∞ if no path exists