{"record":{"id":"6ac16d8739ca6551","repo":"apache/seatunnel","slug":"operator-extension-requires-a-non-null-conditionex","errorCode":null,"errorMessage":"Operator EXTENSION requires a non-null ConditionExtension","messagePattern":"Operator EXTENSION requires a non-null ConditionExtension","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/Condition.java","lineNumber":75,"sourceCode":"        if (operator == null) {\n            throw new IllegalArgumentException(\"Condition operator must not be null\");\n        }\n        if (operator.getSource() == ConditionOperator.Source.FIELD && compareOption == null) {\n            throw new IllegalArgumentException(\n                    String.format(\n                            \"Operator %s requires a compareOption (cross-field comparison), but compareOption is null\",\n                            operator.name()));\n        }\n        if (operator.getArity() == ConditionOperator.Arity.BINARY\n                && operator.getSource() == ConditionOperator.Source.LITERAL\n                && expectValue == null) {\n            throw new IllegalArgumentException(\n                    String.format(\n                            \"Operator %s requires an expectValue, but expectValue is null\",\n                            operator.name()));\n        }\n        if (operator == ConditionOperator.EXTENSION && extension == null) {\n            throw new IllegalArgumentException(\n                    \"Operator EXTENSION requires a non-null ConditionExtension\");\n        }\n        this.option = option;\n        this.operator = operator;\n        this.expectValue = expectValue;\n        this.compareOption = compareOption;\n        this.extension = extension;\n    }\n\n    public static <T> Condition<T> of(Option<T> option, T expectValue) {\n        return new Condition<>(option, expectValue);\n    }\n\n    public static <T> Condition<T> of(Option<T> option, ConditionOperator op, T expectValue) {\n        return new Condition<>(option, op, expectValue, null);\n    }\n\n    public <E> Condition<T> and(Option<E> option, E expectValue) {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/Condition.java#L57-L93","documentation":"ExcelReadStrategy.getCellValue converts a POI Cell value based on the cell's CellType. Recognized types (numeric, string, boolean, formula results, etc.) are converted; anything reaching the default branch — e.g. CellType.BLANK, _NONE, or ERROR — throws FileConnectorException with UNSUPPORTED_DATA_TYPE naming the unsupported CellType.","triggerScenarios":"readByPoi iterates sheet cells and calls getCellValue with a CellType not handled by the switch, such as CellType.ERROR (a cell containing #DIV/0!, #N/A, etc.) or CellType._NONE/BLANK reaching the converter.","commonSituations":"Excel sheets containing formula error values (#REF!, #VALUE!) in the data range; corrupted cells; sheets where blank cells are not filtered out before conversion; locale/Excel-specific cell states.","solutions":["Fix the source workbook: remove or correct cells with error values (#DIV/0!, #N/A, #REF!) from the data range.","Preprocess the Excel file to convert error cells to empty strings or sentinel values.","If you control the code, extend getCellValue to map CellType.ERROR/BLANK to null or a default value instead of throwing."],"exampleFix":"// before\ncell formula: =1/0   -> CellType.ERROR thrown as unsupported\n// after\ncell formula: =IFERROR(1/0, \"\")","handlingStrategy":"validation","validationCode":"java\n// Before reading, sanitize the workbook: check for error cells in the data range\nfor (Row row : sheet) {\n    for (Cell cell : row) {\n        if (cell.getCellType() == CellType.ERROR || cell.getCellType() == CellType._NONE) {\n            throw new IllegalStateException(\"Cell \" + cell.getAddress() + \" has unsupported type \"\n                + cell.getCellType() + \"; fix the workbook before reading\");\n        }\n    }\n}","typeGuard":"java\nstatic boolean isSupportedCellType(CellType t) {\n    return t == CellType.NUMERIC || t == CellType.STRING || t == CellType.BOOLEAN\n        || t == CellType.FORMULA;\n}","tryCatchPattern":"java\ntry {\n    reader.readProcess(split);\n} catch (FileConnectorException e) {\n    if (e.getMessage().contains(\"type not support\")) {\n        LOG.error(\"Workbook contains unsupported cell type (e.g. #DIV/0!, #N/A) — clean the file\", e);\n    }\n}","preventionTips":["Wrap error-prone formulas with IFERROR in source workbooks","Sanitize exports before ingestion: replace error cells with blanks or sentinels","Test representative workbooks for ERROR/BLANK cells before production runs"],"tags":["excel","poi","cell-type","data-type"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}