Package org.apache.calcite.model
Class ModelHandler
java.lang.Object
org.apache.calcite.model.ModelHandler
Reads a model and creates schema objects accordingly.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Extra operands automatically injected into aJsonCustomSchema.operand
, as extra context for the adapter. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addFunctions
(SchemaPlus schema, @Nullable String functionName, List<String> unusedPath, String className, @Nullable String methodName, boolean upCase) Creates and validates aScalarFunctionImpl
, and adds it to a schema.static void
create
(SchemaPlus schema, String functionName, List<String> path, String className, String methodName) Deprecated.operandMap
(@Nullable JsonSchema jsonSchema, @Nullable Map<String, Object> operand) Adds extra entries to an operand to a custom schema.void
visit
(JsonColumn jsonColumn) void
visit
(JsonCustomSchema jsonSchema) void
visit
(JsonCustomTable jsonTable) void
visit
(JsonFunction jsonFunction) void
visit
(JsonJdbcSchema jsonSchema) void
visit
(JsonLattice jsonLattice) void
visit
(JsonMapSchema jsonSchema) void
visit
(JsonMaterialization jsonMaterialization) void
visit
(JsonMeasure jsonMeasure) void
void
void
void
-
Constructor Details
-
ModelHandler
- Throws:
IOException
-
-
Method Details
-
create
@Deprecated public static void create(SchemaPlus schema, String functionName, List<String> path, String className, String methodName) -
addFunctions
public static void addFunctions(SchemaPlus schema, @Nullable String functionName, List<String> unusedPath, String className, @Nullable String methodName, boolean upCase) Creates and validates aScalarFunctionImpl
, and adds it to a schema. IfmethodName
is "*", may add more than one function.- Parameters:
schema
- Schema to add tofunctionName
- Name of function; null to derived from method nameunusedPath
- Path to look for functions (currently ignored)className
- Class to inspect for methods that may be user-defined functionsmethodName
- Method name; null means use the class as a UDF; "*" means add all methodsupCase
- Whether to convert method names to upper case, so that they can be called without using quotes
-
visit
-
visit
-
visit
-
operandMap
protected Map<String,Object> operandMap(@Nullable JsonSchema jsonSchema, @Nullable Map<String, Object> operand) Adds extra entries to an operand to a custom schema. -
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
addFunctions(org.apache.calcite.schema.SchemaPlus, java.lang.String, java.util.List<java.lang.String>, java.lang.String, java.lang.String, boolean)
.