{"record":{"id":"b0e1c41be75967b3","repo":"pathwaycom/pathway","slug":"the-behavior-argument-of-join-should-be-of-type-pa","errorCode":null,"errorMessage":"The behavior argument of join should be of type pathway.temporal.CommonBehavior.","messagePattern":"The behavior argument of join should be of type pathway\\.temporal\\.CommonBehavior\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/internals/arg_handlers.py","lineNumber":151,"sourceCode":"            from pathway.stdlib.temporal import Direction\n\n            if isinstance(direction, str):\n                raise ValueError(\n                    \"Received `direction` argument of join that is a string.\\n\"\n                    + \"You probably want to use one of \"\n                    + \"Direction.BACKWARD, Direction.FORWARD or Direction.NEAREST values.\"\n                )\n            if not isinstance(direction, Direction):\n                raise ValueError(\n                    \"direction argument of join should be of type asof_join.Direction.\"\n                )\n\n        if \"behavior\" in kwargs:\n            behavior = processed_kwargs[\"behavior\"] = kwargs.pop(\"behavior\")\n            from pathway.stdlib.temporal import CommonBehavior\n\n            if not isinstance(behavior, CommonBehavior):\n                raise ValueError(\n                    \"The behavior argument of join should be of type pathway.temporal.CommonBehavior.\"\n                )\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","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/internals/arg_handlers.py#L133-L169","documentation":"The join argument preprocessor validates the `behavior` kwarg for temporal (as-of/interval) joins. It must be an instance of `pathway.stdlib.temporal.CommonBehavior` (created via `pw.temporal.common_behavior(...)`), which controls buffering/allowing exact matches. Anything else — including plain dicts or tuples — is rejected eagerly.","triggerScenarios":"Passing behavior=(delay, window) as a tuple (an older Pathway API accepted this shape), behavior={\"delay\": ...}, or any non-CommonBehavior value to Table.join with temporal semantics.","commonSituations":"Upgrading from old Pathway versions where asof_join accepted `behavior=(delay, horizon)` tuples; converting temporal join examples that mix `behavior` with `interval` and reusing raw tuple parameters.","solutions":["Wrap your parameters: behavior=pw.temporal.common_behavior(closed_cb, allowed_latency) with booleans for exact-match handling.","Remove the `behavior` argument if you do not need buffering semantics.","Check the installed Pathway version's temporal API docs — the tuple form was replaced by CommonBehavior in later releases."],"exampleFix":"# before (old API)\nt.join_asof(right, t_left_time, t_right_time, behavior=(100, 500))\n\n# after\nimport pathway as pw\nt.join_asof(right, t_left_time, t_right_time,\n           behavior=pw.temporal.common_behavior(closed_cb=False, allowed_latency=500))","handlingStrategy":"type-guard","validationCode":"from pathway.stdlib.temporal import CommonBehavior\nassert behavior is None or isinstance(behavior, CommonBehavior)","typeGuard":"from pathway.stdlib.temporal import CommonBehavior\n\ndef is_valid_behavior(b) -> bool:\n    return b is None or isinstance(b, CommonBehavior)","tryCatchPattern":null,"preventionTips":["Build behavior only via pw.temporal.common_behavior(...).","When upgrading Pathway, grep code for behavior=( tuple usage and migrate it."],"tags":["pathway","join","temporal","argument-validation","migration"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}