{"record":{"id":"4cb3a34bcdee985a","repo":"apache/beam","slug":"cannot-translate-euphoria-join-operator-to-beam","errorCode":null,"errorMessage":"Cannot translate Euphoria 'Join' operator to Beam transformations. Given join type '${joinType}' is not supported for BroadcastHashJoin.","messagePattern":"Cannot translate Euphoria 'Join' operator to Beam transformations\\. Given join type '(.+?)' is not supported for BroadcastHashJoin\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/extensions/euphoria/src/main/java/org/apache/beam/sdk/extensions/euphoria/core/translate/BroadcastHashJoinTranslator.java","lineNumber":103,"sourceCode":"                    new BroadcastHashLeftJoinFn<>(\n                        broadcastRight,\n                        operator.getJoiner(),\n                        accumulators,\n                        operator.getName().orElse(null)))\n                .withSideInputs(broadcastRight));\n      case RIGHT:\n        final PCollectionView<Map<KeyT, Iterable<LeftT>>> broadcastLeft =\n            computeViewAsMultimapIfAbsent(left, operator.getLeftKeyExtractor(), leftKeyed);\n        return rightKeyed.apply(\n            ParDo.of(\n                    new BroadcastHashRightJoinFn<>(\n                        broadcastLeft,\n                        operator.getJoiner(),\n                        accumulators,\n                        operator.getName().orElse(null)))\n                .withSideInputs(broadcastLeft));\n      default:\n        throw new UnsupportedOperationException(\n            String.format(\n                \"Cannot translate Euphoria '%s' operator to Beam transformations.\"\n                    + \" Given join type '%s' is not supported for BroadcastHashJoin.\",\n                Join.class.getSimpleName(), operator.getType()));\n    }\n  }\n\n  /**\n   * Creates new {@link PCollectionView} of given {@code pCollectionToView} iff there is no {@link\n   * PCollectionView} already associated with {@code Key}.\n   *\n   * @param pCollectionToView a {@link PCollection} view will be created from by applying {@link\n   *     View#asMultimap()}\n   * @param <V> value key type\n   * @return the current (already existing or computed) value associated with the specified key\n   */\n  private <V> PCollectionView<Map<KeyT, Iterable<V>>> computeViewAsMultimapIfAbsent(\n      PCollection<V> pcollection,","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/extensions/euphoria/src/main/java/org/apache/beam/sdk/extensions/euphoria/core/translate/BroadcastHashJoinTranslator.java#L85-L121","documentation":"The Euphoria Join operator supports only LEFT, RIGHT and FULL join types in BroadcastHashJoinTranslator; any other Join.Type (e.g. INNER) reaches the default branch of the switch and throws UnsupportedOperationException. Beam's broadcast hash join implementation is built around side inputs, which only makes sense for the outer-join variants it implements.","triggerScenarios":"Translating a Euphoria Join operator with Join.Type.INNER (or any type other than LEFT/RIGHT/FULL) through the BroadcastHashJoinTranslator, i.e. via join with a broadcast hint / JoinTranslator's broadcast path.","commonSituations":"Developers porting Spark/Flink Euphoria pipelines to Beam using inner joins with broadcast hints; code that assumes all join types are supported on the broadcast path.","solutions":["Use JoinTranslator's non-broadcast (CoGroup-based) path, which supports INNER joins, instead of the broadcast path","Change the join type to LEFT, RIGHT, or FULL if broadcast semantics are acceptable","Pre-compute the inner-join logic manually with a side input / lookup map in a ParDo","Check operator.getType() before translating and route unsupported types to a different translator"],"exampleFix":"// before\nJoin.of(left, right).by(...).type(Join.Type.INNER).broadcast().apply(...)\n// after\nJoin.of(left, right).by(...).type(Join.Type.INNER).apply(...) // no broadcast hint","handlingStrategy":"validation","validationCode":"if (join.getType() == Join.Type.INNER) { throw new IllegalArgumentException(\"BroadcastHashJoinTranslator supports only LEFT/RIGHT/FULL; use JoinTranslator for INNER\"); }","typeGuard":"boolean isBroadcastSupported(Join.Type t) { return t == Join.Type.LEFT || t == Join.Type.RIGHT || t == Join.Type.FULL; }","tryCatchPattern":"try { translate(join); } catch (UnsupportedOperationException e) { /* fall back to CoGroup-based join translation */ }","preventionTips":["Check operator.getType() before choosing a broadcast translation","Avoid broadcast hints for INNER joins","Consult the euphoria extension docs on supported join types"],"tags":["unsupported-operation","join","beam","euphoria"],"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-20T03:17:13.778Z"}