apache/beam · error
Unsupported non-merging WindowFn: " + windowingStrategy
Error message
Unsupported non-merging WindowFn: " + windowingStrategy
What it means
The direct runner's PCollection handling checks the pipeline's windowing strategy and only supports NON_MERGING window functions (i.e. global windows / fixed windows that never merge). If the strategy's mergeStatus is not NON_MERGING, the constructor throws, because this runner cannot implement merging window semantics (sliding/session windows).
Solutions
- Replace merging windows (sessions/sliding) with non-merging windows (GlobalWindows or FixedWindows) for this runner.
- Run the pipeline on a runner that supports merging windows (e.g. Flink, Dataflow) instead of the direct runner.
- Approximate sessions with non-merging fixed windows plus post-hoc grouping if sessions are not strictly required.
Example fix
// before pc.apply(win.withFixedDuration(...)).apply(win.intoSessions(...)); // after pc.apply(win.withFixedDuration(...)).apply(win.intoFixedWindows(...)); // non-merging
Defensive patterns
Strategy: validation
Validate before calling
// before running on the direct runner
if (usesMergingWindows(pipeline)) {
throw new Error('Direct runner does not support merging windows (sessions/sliding)');
} Prevention
- Prefer GlobalWindows/FixedWindows on the direct runner.
- Move session/sliding window pipelines to Flink or Dataflow.
- Document windowing limitations of the TypeScript direct runner in team docs.
When it happens
Trigger: Building a pipeline whose input PCollection uses a merging WindowFn — e.g. Sessions.windows() or SlidingWindows — and running it with the direct (TypeScript portable) runner.
Common situations: Users applying session or sliding window transforms to a pipeline executed by the direct runner; copy-pasting a Python/Java Beam pipeline that supports sessions into the TypeScript runner.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Unsupported windowing output time: " + windowingStrategy
- failed getGroup for
- failed to merge windows, got
- failed to reprocess with merged windows, got
- Specifying alignment (offset) is not supported for session…
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/1bf5354a2794de1a.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/typescript/src/apache_beam/runners/direct_runner.ts:209
transform: PTransform,
context: operators.OperatorContext,
) {
this.receiver = context.getReceiver(
onlyElement(Object.values(transform.outputs)),
);
const inputPc =
context.descriptor.pcollections[
onlyElement(Object.values(transform.inputs))
];
this.keyCoder = context.pipelineContext.getCoder(
context.descriptor.coders[inputPc.coderId].componentCoderIds[0],
);
const windowingStrategy =
context.descriptor.windowingStrategies[inputPc.windowingStrategyId];
if (
windowingStrategy.mergeStatus !== runnerApi.MergeStatus_Enum.NON_MERGING
) {
throw new Error("Unsupported non-merging WindowFn: " + windowingStrategy);
}
if (
windowingStrategy.outputTime !== runnerApi.OutputTime_Enum.END_OF_WINDOW
) {
throw new Error(
"Unsupported windowing output time: " + windowingStrategy,
);
}
this.windowCoder = context.pipelineContext.getCoder(
windowingStrategy.windowCoderId,
);
}
process(wvalue: WindowedValue<any>) {
for (const window of wvalue.windows) {
const wkey =
operators.encodeToBase64(window, this.windowCoder) +
" " +View on GitHub (pinned to 12126d8942)