{"record":{"id":"0b728d6a18c30aa9","repo":"apache/beam","slug":"unsupported-operation-operation-in-filter-expression-call","errorCode":null,"errorMessage":"Unsupported operation '{operation}' in filter expression: {call}","messagePattern":"Unsupported operation '(.+?)' in filter expression: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/FilterUtils.java","lineNumber":227,"sourceCode":"                return Expressions.notNull(ref);\n              } else if (NaNUtil.isNaN(lit)) {\n                return Expressions.notNaN(ref);\n              } else {\n                return Expressions.notEqual(ref, lit);\n              }\n            },\n            call,\n            schema);\n      case IN:\n        return convertFieldInLiteral(Operation.IN, call, schema);\n      case NOT_IN:\n        return convertFieldInLiteral(Operation.NOT_IN, call, schema);\n      case AND:\n        return convertLogicalExpr(Expressions::and, call, schema);\n      case OR:\n        return convertLogicalExpr(Expressions::or, call, schema);\n      default:\n        throw new IllegalArgumentException(\n            String.format(\"Unsupported operation '%s' in filter expression: %s\", operation, call));\n    }\n  }\n\n  private static String getOnlyChildName(SqlBasicCall call) {\n    checkArgument(\n        call.operandCount() == 1,\n        \"Expected only 1 operand but got %s in filter: %s\",\n        call.getOperandList(),\n        call.toString());\n    SqlNode ref = call.operand(0);\n    Preconditions.checkState(\n        ref instanceof SqlIdentifier, \"Expected operand '%s' to be a reference.\", ref);\n    return getFieldName((SqlIdentifier) ref);\n  }\n\n  private static String getFieldName(SqlIdentifier identifier) {\n    if (identifier.isSimple()) {","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/FilterUtils.java#L209-L245","documentation":"During conversion of a parsed SQL call to an Iceberg Expression, FilterUtils only supports a fixed set of SQL operators (comparison operators, IN/NOT IN, AND/OR). Any other operator in the filter triggers this IllegalArgumentException naming the operation and the original call.","triggerScenarios":"Calling FilterUtils.convert(filter, schema) where the parsed expression contains an unsupported operator node — e.g., arithmetic (+, -, *), LIKE, IS NULL, BETWEEN, or function calls inside the predicate.","commonSituations":"Filters using LIKE pattern matching or IS NULL checks, which the converter does not map; passing whole SQL WHERE clauses including unsupported clauses; expecting Spark/Iceberg expression parity with SQL features the converter omits.","solutions":["Rewrite the filter using only supported operators (=, <>, <, <=, >, >=, IN, NOT IN, AND, OR).","Handle unsupported predicates outside this converter (e.g., pre-filter rows or use Iceberg Expressions API directly).","Extend FilterUtils' convert switch if you own the code and need the operator."],"exampleFix":"// before\nExpression e = FilterUtils.convert(\"name LIKE 'a%'\", schema);\n// after\nExpression e = FilterUtils.convert(\"name = 'alice' OR name = 'anna'\", schema);","handlingStrategy":"validation","validationCode":"java.util.Set<String> allowed = java.util.Set.of(\"=\",\"<>\",\"!=\",\"<\",\"<=\",\">\",\">=\");\n// only submit filters whose top-level operators are comparisons, IN/NOT IN, AND, OR","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict user-facing filter syntax to supported operators.","Document that LIKE, IS NULL, BETWEEN, and arithmetic are not supported for pushdown.","Catch IllegalArgumentException from convert and degrade to a non-pushdown read."],"tags":["java","sql","unsupported-operation","apache-beam","iceberg"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}