Class Contexts

java.lang.Object
org.apache.calcite.plan.Contexts

public class Contexts extends Object
Utilities for Context.
  • Field Details

    • EMPTY_CONTEXT

      public static final org.apache.calcite.plan.Contexts.EmptyContext EMPTY_CONTEXT
  • Method Details

    • withConfig

      @Deprecated public static Context withConfig(CalciteConnectionConfig config)
      Deprecated.
      Returns a context that contains a CalciteConnectionConfig.
    • empty

      public static Context empty()
      Returns a context that returns null for all inquiries.
    • of

      public static Context of(Object o)
      Returns a context that wraps an object.

      A call to unwrap(C) will return target if it is an instance of C.

    • of

      public static Context of(@Nullable Object... os)
      Returns a context that wraps an array of objects, ignoring any nulls.
    • chain

      public static Context chain(Context... contexts)
      Returns a context that wraps a list of contexts.

      A call to unwrap(C) will return the first object that is an instance of C.

      If any of the contexts is a Context, recursively looks in that object. Thus this method can be used to chain contexts.