Class ObjectUpdateTypeStrategy
- java.lang.Object
-
- org.apache.flink.table.types.inference.strategies.ObjectUpdateTypeStrategy
-
- All Implemented Interfaces:
TypeStrategy
@Internal public class ObjectUpdateTypeStrategy extends Object implements TypeStrategy
Type strategy for theBuiltInFunctionDefinitions.OBJECT_UPDATEfunction.This strategy infers the return type for the OBJECT_UPDATE function by:
- Extracting the field definitions from the input structured type
- Creating a new structured type with the same class but updating field types to match the types of the new values being assigned
The return type preserves the original class and field names but may have different field types than the input structured type, as field types are updated to match the types of the values being assigned during the update operation.
-
-
Constructor Summary
Constructors Constructor Description ObjectUpdateTypeStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<DataType>inferType(CallContext callContext)Infers a type from the given function call.
-
-
-
Method Detail
-
inferType
public Optional<DataType> inferType(CallContext callContext)
Description copied from interface:TypeStrategyInfers a type from the given function call.- Specified by:
inferTypein interfaceTypeStrategy
-
-