apache/pulsar · error · IllegalArgumentException
There is currently no support windowing in python
Error message
There is currently no support windowing in python
What it means
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.
Source
Thrown at pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java:757
if (functionConfig.getProducerConfig() != null
&& functionConfig.getProducerConfig().getCryptoConfig() != null) {
ValidatorUtils
.validateCryptoKeyReader(functionConfig.getProducerConfig().getCryptoConfig(),
validatableFunctionPackage.getTypePool(), true);
}
return new FunctionConfigUtils.ExtractedFunctionDetails(
functionClassName,
typeArgs[0].asErasure().getTypeName(),
typeArgs[1].asErasure().getTypeName());
}
private static void doPythonChecks(FunctionConfig functionConfig) {
if (functionConfig.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE) {
throw new RuntimeException("Effectively-once processing guarantees not yet supported in Python");
}
if (functionConfig.getWindowConfig() != null) {
throw new IllegalArgumentException("There is currently no support windowing in python");
}
if (functionConfig.getMaxMessageRetries() != null && functionConfig.getMaxMessageRetries() >= 0) {
throw new IllegalArgumentException("Message retries not yet supported in python");
}
}
private static void doGolangChecks(FunctionConfig functionConfig) {
if (functionConfig.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE) {
throw new RuntimeException("Effectively-once processing guarantees not yet supported in Go function");
}
if (functionConfig.getWindowConfig() != null) {
throw new IllegalArgumentException("Windowing is not supported in Go function yet");
}
if (functionConfig.getMaxMessageRetries() != null && functionConfig.getMaxMessageRetries() >= 0) {
throw new IllegalArgumentException("Message retries not yet supported in Go function");View on GitHub (pinned to 820761864e)
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
Example fix
// before config.setWindowConfig(windowConfig); // python runtime // after // no windowConfig; implement aggregation inside the Python function
Defensive patterns
Strategy: validation
Validate before calling
if (config.getRuntime() == FunctionConfig.Runtime.PYTHON && config.getWindowConfig() != null) { throw new IllegalArgumentException("Windowing is unsupported for Python functions"); } Type guard
boolean pythonWindowingSupported(FunctionConfig c) { return c.getRuntime() != FunctionConfig.Runtime.PYTHON || c.getWindowConfig() == null; } Try / catch
try { ... } catch (IllegalArgumentException e) { if (e.getMessage().contains("no support windowing in python")) { log.error("Remove windowConfig or move to Java runtime"); } } Prevention
- 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
When it happens
Trigger: Submitting a function with runtime PYTHON and setWindowConfig(...) non-null (tumbling/sliding/session window configuration).
Common situations: Porting a Java windowed function to Python; config generators that attach window settings unconditionally.
Related errors
- Effectively-once processing guarantees not yet supported in
- Function classname cannot be null
- Invalid schema definition data for string schema : '
- When Guarantees == ATMOST_ONCE, autoAck must be equal to tru
- Function class name is not provided.
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/d275b59c07c9e3a5.
Report an issue: GitHub.