Package com.datasqrl.json
Class JsonObject
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.ScalarFunction
-
- com.datasqrl.json.JsonObject
-
- All Implemented Interfaces:
Serializable,org.apache.flink.table.functions.FunctionDefinition
public class JsonObject extends org.apache.flink.table.functions.ScalarFunctionCreates a JSON object from key-value pairs, where the key is mapped to a field with the associated value. Key-value pairs are provided as a list of even length, with the first element of each pair being the key and the second being the value. If multiple key-value pairs have the same key, the last pair is added to the JSON object.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JsonObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.datasqrl.json.FlinkJsonTypeeval(Object... objects)org.apache.flink.table.types.inference.TypeInferencegetTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory)-
Methods inherited from class org.apache.flink.table.functions.ScalarFunction
getKind, getParameterTypes, getResultType
-
Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction
close, functionIdentifier, open, toString
-
-
-
-
Method Detail
-
eval
public com.datasqrl.json.FlinkJsonType eval(Object... objects)
-
getTypeInference
public org.apache.flink.table.types.inference.TypeInference getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory)
- Specified by:
getTypeInferencein interfaceorg.apache.flink.table.functions.FunctionDefinition- Overrides:
getTypeInferencein classorg.apache.flink.table.functions.ScalarFunction
-
-