{"record":{"id":"431a195cd3f47bec","repo":"apache/beam","slug":"s-getsideinputwindow-should-never-be-called-it-is-a-private","errorCode":null,"errorMessage":"%s.getSideInputWindow() should never be called. It is a private implementation detail of sdk utilities. This message indicates a bug in the Beam SDK.","messagePattern":"(.+?)\\.getSideInputWindow\\(\\) should never be called\\. It is a private implementation detail of sdk utilities\\. This message indicates a bug in the Beam SDK\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/IdentityWindowFn.java","lineNumber":100,"sourceCode":"  public void verifyCompatibility(WindowFn<?, ?> other) throws IncompatibleWindowException {\n    throw new UnsupportedOperationException(\n        String.format(\n            \"%s.verifyCompatibility() should never be called.\"\n                + \" It is a private implementation detail of sdk utilities.\"\n                + \" This message indicates a bug in the Beam SDK.\",\n            getClass().getCanonicalName()));\n  }\n\n  @Override\n  public Coder<BoundedWindow> windowCoder() {\n    // Safe because the prior WindowFn provides both the windows and the coder.\n    // The Coder is _not_ actually a coder for an arbitrary BoundedWindow.\n    return coder;\n  }\n\n  @Override\n  public WindowMappingFn<BoundedWindow> getDefaultWindowMappingFn() {\n    throw new UnsupportedOperationException(\n        String.format(\n            \"%s.getSideInputWindow() should never be called.\"\n                + \" It is a private implementation detail of sdk utilities.\"\n                + \" This message indicates a bug in the Beam SDK.\",\n            getClass().getCanonicalName()));\n  }\n\n  @Override\n  public boolean assignsToOneWindow() {\n    return true;\n  }\n}\n","sourceCodeStart":82,"sourceCodeEnd":113,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/IdentityWindowFn.java#L82-L113","documentation":"IdentityWindowFn.getDefaultWindowMappingFn() always throws UnsupportedOperationException. IdentityWindowFn is an internal placeholder window strategy and has no meaningful side-input window mapping; calling it means the internal utility was used in a context (side input lookup) it was never designed for.","triggerScenarios":"Using an IdentityWindowFn-windowed PCollection as the main input of a side-input access (view.asList/MapElements with side inputs), which asks getDefaultWindowMappingFn() to map side-input windows.","commonSituations":"Pipeline bug where internal windowing plumbing leaked to the runner; user code indirectly requesting side-input views of an IdentityWindowFn collection.","solutions":["Report as a Beam SDK bug with the stack trace","Upgrade to a newer Beam release that may have fixed the internal usage","Restructure the pipeline so the collection is not consumed as a side input when IdentityWindowFn is active","Avoid writing custom transforms that swap a PCollection's WindowFn with IdentityWindowFn"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if (pcollection.getWindowingStrategy().getWindowFn() instanceof IdentityWindowFn) { throw new IllegalStateException(\"cannot use as side input\"); }","typeGuard":"boolean mapsSideInputs = !(fn instanceof IdentityWindowFn);","tryCatchPattern":"try { fn.getDefaultWindowMappingFn(); } catch (UnsupportedOperationException e) { /* fall back to default mapping */ }","preventionTips":["Don't consume IdentityWindowFn-windowed collections as side inputs","Check the windowing strategy before creating views","Restructure pipelines so IdentityWindowFn stays internal"],"tags":["java","beam","windowing","side-input","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}