diff --git a/inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/function/ContainsFunction.java b/inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/function/ContainsFunction.java index e316965dde4..e2905eea07e 100644 --- a/inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/function/ContainsFunction.java +++ b/inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/function/ContainsFunction.java @@ -51,6 +51,6 @@ public Object parse(SourceData sourceData, int rowIndex, Context context) { Object rightStrObj = rightStrParser.parse(sourceData, rowIndex, context); String leftStr = OperatorTools.parseString(leftStrObj); String rightStr = OperatorTools.parseString(rightStrObj); - return leftStr.contains(rightStr); + return (leftStr == null || rightStr == null) ? null : leftStr.contains(rightStr); } }