{"record":{"id":"d275b59c07c9e3a5","repo":"apache/pulsar","slug":"there-is-currently-no-support-windowing-in-python","errorCode":null,"errorMessage":"There is currently no support windowing in python","messagePattern":"There is currently no support windowing in python","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java","lineNumber":757,"sourceCode":"        if (functionConfig.getProducerConfig() != null\n                && functionConfig.getProducerConfig().getCryptoConfig() != null) {\n            ValidatorUtils\n                    .validateCryptoKeyReader(functionConfig.getProducerConfig().getCryptoConfig(),\n                            validatableFunctionPackage.getTypePool(), true);\n        }\n        return new FunctionConfigUtils.ExtractedFunctionDetails(\n                functionClassName,\n                typeArgs[0].asErasure().getTypeName(),\n                typeArgs[1].asErasure().getTypeName());\n    }\n\n    private static void doPythonChecks(FunctionConfig functionConfig) {\n        if (functionConfig.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE) {\n            throw new RuntimeException(\"Effectively-once processing guarantees not yet supported in Python\");\n        }\n\n        if (functionConfig.getWindowConfig() != null) {\n            throw new IllegalArgumentException(\"There is currently no support windowing in python\");\n        }\n\n        if (functionConfig.getMaxMessageRetries() != null && functionConfig.getMaxMessageRetries() >= 0) {\n            throw new IllegalArgumentException(\"Message retries not yet supported in python\");\n        }\n    }\n\n    private static void doGolangChecks(FunctionConfig functionConfig) {\n        if (functionConfig.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE) {\n            throw new RuntimeException(\"Effectively-once processing guarantees not yet supported in Go function\");\n        }\n\n        if (functionConfig.getWindowConfig() != null) {\n            throw new IllegalArgumentException(\"Windowing is not supported in Go function yet\");\n        }\n\n        if (functionConfig.getMaxMessageRetries() != null && functionConfig.getMaxMessageRetries() >= 0) {\n            throw new IllegalArgumentException(\"Message retries not yet supported in Go function\");","sourceCodeStart":739,"sourceCodeEnd":775,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java#L739-L775","documentation":"Windowing is only supported for the Java runtime. doPythonChecks throws IllegalArgumentException when a Python function config carries a WindowConfig, since the Python runtime has no windowing implementation.","triggerScenarios":"Submitting a function with runtime PYTHON and setWindowConfig(...) non-null (tumbling/sliding/session window configuration).","commonSituations":"Porting a Java windowed function to Python; config generators that attach window settings unconditionally.","solutions":["Remove the windowConfig for Python functions and aggregate state manually in the function","Implement the windowed function in Java where windowing is supported","Handle windowing upstream (e.g. in a consumer) instead of via function windowing"],"exampleFix":"// before\nconfig.setWindowConfig(windowConfig); // python runtime\n// after\n// no windowConfig; implement aggregation inside the Python function","handlingStrategy":"validation","validationCode":"if (config.getRuntime() == FunctionConfig.Runtime.PYTHON && config.getWindowConfig() != null) { throw new IllegalArgumentException(\"Windowing is unsupported for Python functions\"); }","typeGuard":"boolean pythonWindowingSupported(FunctionConfig c) { return c.getRuntime() != FunctionConfig.Runtime.PYTHON || c.getWindowConfig() == null; }","tryCatchPattern":"try { ... } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"no support windowing in python\")) { log.error(\"Remove windowConfig or move to Java runtime\"); } }","preventionTips":["Only attach WindowConfig to JAVA runtime functions","Implement windowing logic manually inside Python functions","Review config generators so window settings are not copied across runtimes"],"tags":["pulsar","functions","python","windowing","limitations"],"backgroundTag":"unsupported-runtime-feature","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}