{"record":{"id":"f103cd3973b1d56f","repo":"apache/seatunnel","slug":"condition-option-must-not-be-null","errorCode":null,"errorMessage":"Condition option must not be null","messagePattern":"Condition option must not be null","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":55,"sourceCode":"    private Condition<?> next = null;\n\n    Condition(Option<T> option, T expectValue) {\n        this(option, ConditionOperator.EQUAL, expectValue, null, null);\n    }\n\n    Condition(\n            Option<T> option, ConditionOperator operator, T expectValue, Option<?> compareOption) {\n        this(option, operator, expectValue, compareOption, null);\n    }\n\n    Condition(\n            Option<T> option,\n            ConditionOperator operator,\n            T expectValue,\n            Option<?> compareOption,\n            ConditionExtension<T> extension) {\n        if (option == null) {\n            throw new IllegalArgumentException(\"Condition option must not be null\");\n        }\n        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        }","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/Condition.java#L37-L73","documentation":"ExcelReadStrategy.assertPoiFileSize guards the POI read path against out-of-memory failures: it compares the split's file size (from split.getLength() or the Hadoop FileSystem file status) against poi_excel_max_file_size and throws FileConnectorException with UNSUPPORTED_OPERATION when the file is larger. The message tells you to switch to the streaming EasyExcel engine or raise the limit.","triggerScenarios":"readByPoi calls assertPoiFileSize and the target Excel file's byte size exceeds the configured poi_excel_max_file_size (or its default) while excel_engine is POI.","commonSituations":"Reading multi-hundred-MB .xlsx exports (data warehouse dumps) with the default POI engine; a limit configured for small files reused on a job that picks up much larger files; team policy keeps POI for formula support but the data volume grew.","solutions":["Set excel_engine = EasyExcel so the file is read in streaming mode without the POI size limit.","Increase poi_excel_max_file_size (bytes) to cover the actual file size if POI features (formulas via evaluator) are required — ensure the worker has enough heap.","Split or archive the oversized workbook into smaller files below the limit."],"exampleFix":"// before\nexcel_engine = \"POI\"\n// poi_excel_max_file_size = 104857600\n// after\nexcel_engine = \"EasyExcel\"   // or raise poi_excel_max_file_size = 1073741824","handlingStrategy":"fallback","validationCode":"java\nlong limit = pluginConfig.hasPath(\"poi_excel_max_file_size\")\n    ? pluginConfig.getLong(\"poi_excel_max_file_size\")\n    : FileBaseSourceOptions.POI_EXCEL_MAX_FILE_SIZE.defaultValue();\nlong len = fileSystem.getFileStatus(path).getLen();\nboolean usePoi = len <= limit; // else configure excel_engine = EasyExcel\n","typeGuard":null,"tryCatchPattern":"java\ntry {\n    reader.readProcess(split);\n} catch (FileConnectorException e) {\n    if (e.getMessage().contains(\"larger than POI limit\")) {\n        LOG.error(\"File {} exceeds POI limit — switch excel_engine=EasyExcel or raise poi_excel_max_file_size\", e);\n    }\n}","preventionTips":["Check the size of the largest expected Excel file before choosing the engine","Prefer EasyExcel for large or unbounded workbooks","Set poi_excel_max_file_size deliberately based on worker heap, not arbitrarily"],"tags":["excel","file-size","memory","poi"],"backgroundTag":"file-size-limit-exceeded","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"}