{"record":{"id":"214d349a4fe6323f","repo":"apache/beam","slug":"unexpected-join-type","errorCode":null,"errorMessage":"Unexpected join type","messagePattern":"Unexpected join type","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/transforms/Join.java","lineNumber":271,"sourceCode":"        case LEFT_OUTER_BROADCAST:\n          return tuple.apply(\n              CoGroup.join(LHS_TAG, CoGroup.By.fieldAccessDescriptor(resolvedPredicate.lhs))\n                  .join(\n                      RHS_TAG,\n                      CoGroup.By.fieldAccessDescriptor(resolvedPredicate.rhs)\n                          .withOptionalParticipation()\n                          .withSideInput())\n                  .crossProductJoin());\n        case RIGHT_OUTER:\n          return tuple.apply(\n              CoGroup.join(\n                      LHS_TAG,\n                      CoGroup.By.fieldAccessDescriptor(resolvedPredicate.lhs)\n                          .withOptionalParticipation())\n                  .join(RHS_TAG, CoGroup.By.fieldAccessDescriptor(resolvedPredicate.rhs))\n                  .crossProductJoin());\n        default:\n          throw new RuntimeException(\"Unexpected join type\");\n      }\n    }\n  }\n}\n","sourceCodeStart":253,"sourceCodeEnd":276,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/transforms/Join.java#L253-L276","documentation":"Join.expand translates a JoinType (INNER, LEFT, RIGHT, OUTER) into a CoGroup cross-product join with participation settings. The switch has no case matching the resolved join type, so an unhandled value falls into default and throws, meaning the join type was not one of the supported four.","triggerScenarios":"Applying a Join whose JoinType is not INNER, LEFT, RIGHT, or OUTER — e.g. passing JoinType.LEFT_OUTER or a custom/legacy enum value that the switch in Join's inner DoFn does not map.","commonSituations":"Older code using deprecated JoinType constants (e.g. from earlier Beam versions) after a rename/refactor, or constructing Join with a null/default JoinType that resolves to an unexpected value.","solutions":["Use one of JoinType.INNER, LEFT, RIGHT, or OUTER (Join.innerJoin/leftJoin/rightJoin/outerJoin helpers).","Replace deprecated or custom JoinType values with the current Beam enum constants.","Check for JoinType collisions after upgrading Beam; adapt to renamed constants.","If the value looks valid but still throws, file a Beam issue — the switch is missing a case."],"exampleFix":"// before\nJoin.of(lhs, rhs).setJoinType(JoinType.LEFT_OUTER)\n// after\nJoin.leftJoin(lhs, rhs).by(\"key\")","handlingStrategy":"validation","validationCode":"","typeGuard":"","tryCatchPattern":"","preventionTips":[],"tags":["java","apache-beam","join","join-type"],"backgroundTag":"unsupported-enum-value","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"}