Package org.apache.calcite.plan
Class Contexts
- java.lang.Object
-
- org.apache.calcite.plan.Contexts
-
public class Contexts extends java.lang.Object
Utilities forContext
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Contexts.ChainContext
Context that wraps a chain of contexts.(package private) static class
Contexts.EmptyContext
Empty context.private static class
Contexts.WrapContext
Context that wraps an object.
-
Field Summary
Fields Modifier and Type Field Description static Contexts.EmptyContext
EMPTY_CONTEXT
-
Constructor Summary
Constructors Modifier Constructor Description private
Contexts()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private static void
build(java.util.List<Context> list, Context context)
Recursively populates a list of contexts.private static Context
chain(java.lang.Iterable<? extends Context> contexts)
static Context
chain(Context... contexts)
Returns a context that wraps a list of contexts.static Context
empty()
Returns a context that returns null for all inquiries.static Context
of(java.lang.Object o)
Returns a context that wraps an object.static Context
of(java.lang.Object... os)
Returns a context that wraps an array of objects, ignoring any nulls.static Context
withConfig(CalciteConnectionConfig config)
Deprecated.
-
-
-
Field Detail
-
EMPTY_CONTEXT
public static final Contexts.EmptyContext EMPTY_CONTEXT
-
-
Method Detail
-
withConfig
@Deprecated public static Context withConfig(CalciteConnectionConfig config)
Deprecated.Returns a context that contains aCalciteConnectionConfig
.
-
empty
public static Context empty()
Returns a context that returns null for all inquiries.
-
of
public static Context of(java.lang.Object o)
Returns a context that wraps an object.A call to
unwrap(C)
will returntarget
if it is an instance ofC
.
-
of
public static Context of(java.lang.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 ofC
.If any of the contexts is a
Context
, recursively looks in that object. Thus this method can be used to chain contexts.
-
-