@Override
    public Object parse(SourceData sourceData, int rowIndex, Context context) {
        Object valueObj = valueParser.parse(sourceData, rowIndex, context);
        if (valueObj instanceof ArrayList) {
            return ((ArrayList<?>) valueObj).size();

        } else if (valueObj instanceof Map) {
            return ((Map<?, ?>) valueObj).size();
        }
        return null;
    }
CardinalityFunction  ->  CARDINALITY(array) or CARDINALITY(map)
description:
- Return NULL if the input is NULL;
- Return the number of elements in array if the input is array.
- Return the number of entries in map if the input is map.
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/function/collection/CardinalityFunction.java