{"record":{"id":"6de45a9a75638911","repo":"apache/beam","slug":"s-verifycompatibility-should-never-be-called-it-is-a-private","errorCode":null,"errorMessage":"%s.verifyCompatibility() should never be called. It is a private implementation detail of sdk utilities. This message indicates a bug in the Beam SDK.","messagePattern":"(.+?)\\.verifyCompatibility\\(\\) 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":83,"sourceCode":"  public Collection<BoundedWindow> assignWindows(WindowFn<T, BoundedWindow>.AssignContext c)\n      throws Exception {\n    // The window is provided by the prior WindowFn, which also provides the coder for them\n    return Collections.singleton(c.window());\n  }\n\n  @Override\n  public boolean isCompatible(WindowFn<?, ?> other) {\n    throw new UnsupportedOperationException(\n        String.format(\n            \"%s.isCompatible() 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 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(","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/IdentityWindowFn.java#L65-L101","documentation":"IdentityWindowFn.verifyCompatibility() unconditionally throws UnsupportedOperationException. IdentityWindowFn is an internal Beam SDK utility used only within sdk utilities (e.g. to preserve windowing in transforms); it is not a real user-facing WindowFn, so compatibility checks on it indicate a bug in the Beam SDK itself.","triggerScenarios":"Calling verifyCompatibility() on an IdentityWindowFn instance, typically when a pipeline validation pass compares window strategies and an IdentityWindowFn leaked into a user-visible WindowFn slot.","commonSituations":"Running a pipeline on a Beam version with an internal bug where IdentityWindowFn was incorrectly used as a real WindowFn; custom transforms that copy windowing internals and call verifyCompatibility.","solutions":["Report this as a Beam SDK bug with the pipeline/stack trace (the message explicitly says it indicates an SDK bug)","Check the Beam version; upgrade to the latest patch release where the offending internal usage may be fixed","Review custom PTransforms to ensure they do not apply IdentityWindowFn or call verifyCompatibility on it","Reproduce with a minimal pipeline and open an issue on apache/beam"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (windowFn instanceof IdentityWindowFn) { throw new IllegalStateException(\"IdentityWindowFn cannot be verified; internal SDK utility\"); }","typeGuard":"boolean isIdentity = fn instanceof IdentityWindowFn;","tryCatchPattern":"try { windowFn.verifyCompatibility(other); } catch (UnsupportedOperationException e) { /* SDK bug: report with stack trace */ }","preventionTips":["Never use IdentityWindowFn in user-facing pipeline code","Only call verifyCompatibility on real WindowFn instances","Keep Beam updated and report occurrences as SDK bugs"],"tags":["java","beam","windowing","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"}