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
Nested ClassesModifier and TypeClassDescriptionstatic enumExtra operands automatically injected into aJsonCustomSchema.operand, as extra context for the adapter. -
Constructor Summary
ConstructorsConstructorDescriptionModelHandler(CalciteConnection connection, String uri) Deprecated.ModelHandler(SchemaPlus rootSchema, String uri) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFunctions(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 voidcreate(SchemaPlus schema, String functionName, List<String> path, String className, String methodName) Deprecated.@Nullable StringoperandMap(@Nullable JsonSchema jsonSchema, @Nullable Map<String, Object> operand) Adds extra entries to an operand to a custom schema.voidvisit(JsonColumn jsonColumn) voidvisit(JsonCustomSchema jsonSchema) voidvisit(JsonCustomTable jsonTable) voidvisit(JsonFunction jsonFunction) voidvisit(JsonJdbcSchema jsonSchema) voidvisit(JsonLattice jsonLattice) voidvisit(JsonMapSchema jsonSchema) voidvisit(JsonMaterialization jsonMaterialization) voidvisit(JsonMeasure jsonMeasure) voidvoidvoidvoid
-
Constructor Details
-
ModelHandler
- Throws:
IOException
-
ModelHandler
Deprecated.- 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. IfmethodNameis "*", 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
-
defaultSchemaName
-
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).