{"record":{"id":"d39a9a36441a98b0","repo":"pathwaycom/pathway","slug":"received-id-argument-but-was-not-expecting-any","errorCode":null,"errorMessage":"Received `id` argument but was not expecting any.\nNot every join type supports `id` argument.","messagePattern":"Received `id` argument but was not expecting any\\.\nNot every join type supports `id` argument\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/internals/arg_handlers.py","lineNumber":102,"sourceCode":"            elif isinstance(how, JoinMode):\n                pass\n            elif isinstance(how, str):\n                raise ValueError(\n                    \"Received `how` argument of join that is a string.\\n\"\n                    + \"You probably want to use one of \"\n                    + \"JoinMode.INNER, JoinMode.LEFT, JoinMode.RIGHT or JoinMode.OUTER values.\"\n                )\n            else:\n                raise ValueError(\n                    \"How argument of join should be one of \"\n                    + \"JoinMode.INNER, JoinMode.LEFT, JoinMode.RIGHT or JoinMode.OUTER values.\"\n                )\n\n        if \"id\" in kwargs:\n            id = kwargs.pop(\"id\")\n            processed_kwargs[\"id\"] = id\n            if not allow_id:\n                raise ValueError(\n                    \"Received `id` argument but was not expecting any.\\n\"\n                    + \"Not every join type supports `id` argument.\"\n                )\n            elif id is None:\n                pass\n            elif isinstance(id, str):\n                raise ValueError(\n                    \"Received `id` argument of join that is a string.\\n\"\n                    + f\"Did you mean <table>.{id}\"\n                    + f\" instead of {repr(id)}?\"\n                )\n            elif not isinstance(id, expr.ColumnReference):\n                raise ValueError(\n                    \"The id argument of a join has to be a ColumnReference.\"\n                )\n\n        if \"defaults\" in kwargs:\n            processed_kwargs[\"defaults\"] = kwargs.pop(\"defaults\")","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/internals/arg_handlers.py#L84-L120","documentation":"The 'id' kwarg of a join names the output id column (a ColumnReference such as left.id or right.t.id) and is only supported by joins that actually preserve/derive row identities (e.g. join_any/asof variants), not by plain inner/left/right/outer joins. This handler runs with allow_id=False, so passing id=... to an unsupported join raises this ValueError.","triggerScenarios":"t1.join_inner(t2, t1.k == t2.k, id=t1.id); passing id to join/join_left/join_right/join_outer; carrying id= over when copying an asof_join example into a regular join.","commonSituations":"Copy-pasting io.asof_join_left(..., id=...) snippets into standard joins; assuming every join can name its output id column.","solutions":["Remove the id kwarg from this join type.","If you need row identity in the output, use a join type that supports id (e.g. asof joins) or rename a column afterwards with .rename().","Check the specific join method's signature for supported kwargs."],"exampleFix":"# before\nt1.join_inner(t2, t1.k == t2.k, id=t1.id)\n\n# after\nt1.join_inner(t2, t1.k == t2.k)","handlingStrategy":"validation","validationCode":"SUPPORTS_ID = {\"join_any\", \"asof_join_left\", \"asof_join_right\"}\nif method in SUPPORTS_ID:\n    result = getattr(t1, method)(t2, *on, id=t1.id)\nelse:\n    result = getattr(t1, method)(t2, *on)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the join method's signature: id= is only supported where row identity is defined.","Remove id= when switching from asof/io joins to plain inner/left/right/outer joins."],"tags":["join","api-misuse","kwargs","id-column"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}