{"record":{"id":"ec9c0d61715a1cc5","repo":"pathwaycom/pathway","slug":"join-received-extra-kwargs-you-probably-want-to-u","errorCode":null,"errorMessage":"Join received extra kwargs.\nYou probably want to use TableLike.join(...).select(**kwargs) to compute output columns.","messagePattern":"Join received extra kwargs\\.\nYou probably want to use TableLike\\.join\\(\\.\\.\\.\\)\\.select\\(\\*\\*kwargs\\) to compute output columns\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/internals/arg_handlers.py","lineNumber":171,"sourceCode":"                )\n\n        if \"interval\" in kwargs:\n            from pathway.stdlib.temporal import Interval\n\n            interval = processed_kwargs[\"interval\"] = kwargs.pop(\"interval\")\n            if not isinstance(interval, Interval):\n                raise ValueError(\n                    \"The interval argument of a join should be of a type pathway.temporal.Interval.\"\n                )\n\n        if \"left_exactly_once\" in kwargs:\n            processed_kwargs[\"left_exactly_once\"] = kwargs.pop(\"left_exactly_once\")\n\n        if \"right_exactly_once\" in kwargs:\n            processed_kwargs[\"right_exactly_once\"] = kwargs.pop(\"right_exactly_once\")\n\n        if kwargs:\n            raise ValueError(\n                \"Join received extra kwargs.\\n\"\n                + \"You probably want to use TableLike.join(...).select(**kwargs) to compute output columns.\"\n            )\n        return (self, other, *on), processed_kwargs\n\n    return handler\n\n\ndef reduce_args_handler(self, *args, **kwargs):\n    for arg in args:\n        if expr.smart_name(arg) is None:\n            if isinstance(arg, str):\n                raise ValueError(\n                    f\"Expected a ColumnReference, found a string. Did you mean this.{arg} instead of {repr(arg)}?\"\n                )\n            else:\n                raise ValueError(\n                    \"In reduce() all positional arguments have to be a ColumnReference.\"","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/internals/arg_handlers.py#L153-L189","documentation":"Pathway's join argument handler rejects any leftover keyword arguments after known kwargs (how, id, direction, behavior, interval, left_exactly_once, right_exactly_once, mode, etc.) are consumed. This guards against the common mistake of trying to define output columns inside join(), which in Pathway is done by chaining .select(**kwargs) on the join result.","triggerScenarios":"Calling table_a.join(table_b, table_a.key == table_b.key, my_col=table_a.value + 1) — the my_col kwarg is not a join parameter so it survives popping and triggers the error.","commonSituations":"Developers coming from pandas merge/sql or Spark where join takes column expressions; writing join(..., left_time=..., right_time=...) on a plain (non-temporal) join in a version that does not accept those kwargs.","solutions":["Move output-column definitions to a chained select: table_a.join(table_b, on).select(new_col=table_a.value + table_b.value).","Check the exact join signature for your Pathway version (Table.join vs Table.join_left/join_outer vs join_asof) and use the method that accepts the kwargs you pass.","Ensure you are not passing a kwarg meant for join_asof (direction/behavior/interval) to plain join."],"exampleFix":"# before\nresult = t1.join(t2, t1.id == t2.id, total=t1.price + t2.price)\n\n# after\nresult = t1.join(t2, t1.id == t2.id).select(total=t1.price + t2.price)","handlingStrategy":"validation","validationCode":"allowed = {'how', 'id', 'mode', 'direction', 'behavior', 'interval', 'left_exactly_once', 'right_exactly_once'}\nextra = set(kwargs) - allowed\nassert not extra, f'join() got unsupported kwargs {extra}; put output columns in .select()'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat join() as join-only; always chain .select(**kwargs) for output columns.","Pin the join kwargs your Pathway version supports in a thin wrapper function."],"tags":["pathway","join","api-misuse","argument-validation"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}