{"record":{"id":"20175a0285b5b9ab","repo":"apache/beam","slug":"setting-key-is-not-yet-supported","errorCode":null,"errorMessage":"Setting '{key}' is not yet supported","messagePattern":"Setting '(.+?)' is not yet supported","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/dataframe/frames.py","lineNumber":3348,"sourceCode":"      requires_partition_by = partitionings.Singleton(reason=(\n          \"dropna(axis=1) cannot currently be parallelized. It requires \"\n          \"checking all values in each column for NaN values, to determine \"\n          \"if that column should be dropped.\"\n      ))\n    else:\n      requires_partition_by = partitionings.Arbitrary()\n    return frame_base.DeferredFrame.wrap(\n        expressions.ComputedExpression(\n            'dropna',\n            lambda df: df.dropna(axis=axis, **kwargs),\n            [self._expr],\n            preserves_partition_by=partitionings.Arbitrary(),\n            requires_partition_by=requires_partition_by))\n\n  def _eval_or_query(self, name, expr, inplace, **kwargs):\n    for key in ('local_dict', 'global_dict', 'level', 'target', 'resolvers'):\n      if key in kwargs:\n        raise NotImplementedError(f\"Setting '{key}' is not yet supported\")\n\n    # look for '@<py identifier>'\n    if re.search(r'\\@[^\\d\\W]\\w*', expr, re.UNICODE):\n      raise NotImplementedError(\"Accessing locals with @ is not yet supported \"\n                                \"(https://github.com/apache/beam/issues/20626)\"\n                                )\n\n    result_expr = expressions.ComputedExpression(\n        name,\n        lambda df: getattr(df, name)(expr, **kwargs),\n        [self._expr],\n        requires_partition_by=partitionings.Arbitrary(),\n        preserves_partition_by=partitionings.Arbitrary())\n\n    if inplace:\n      self._expr = result_expr\n    else:\n      return frame_base.DeferredFrame.wrap(result_expr)","sourceCodeStart":3330,"sourceCodeEnd":3366,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/dataframe/frames.py#L3330-L3366","documentation":"DeferredFrame.eval()/query() (via _eval_or_query) rejects pandas kwargs local_dict, global_dict, level, target, and resolvers. These require local variable interpolation machinery Beam's expression model does not support, so NotImplementedError is raised.","triggerScenarios":"Calling df.query('a > @threshold', local_dict=...) or df.eval(...) on a Beam deferred frame while passing any of local_dict, global_dict, level, target, or resolvers kwargs","commonSituations":"Porting pandas query/eval code that substitutes Python variables into expression strings","solutions":["Inline the literal values into the expression string before calling query/eval (e.g. f'a > {threshold!r}')","Drop the unsupported kwargs and rely on column-name-only expressions","Materialize to pandas and call query/eval there"],"exampleFix":"// before\nresult = df.beam.query('a > @limit', local_dict={'limit': limit})\n// after\nresult = df.beam.query(f'a > {limit!r}')","handlingStrategy":"validation","validationCode":"BAD = {'local_dict', 'global_dict', 'level', 'target', 'resolvers'}\nif BAD & kwargs.keys():\n    raise ValueError(f'unsupported query/eval kwargs: {BAD & kwargs.keys()}')","typeGuard":null,"tryCatchPattern":"try:\n    out = dframe.query(expr)\nexcept NotImplementedError:\n    out = dframe.to_pandas().query(expr, local_dict=locals_dict)","preventionTips":["Interpolate values into the expression string yourself instead of using kwargs","Lint ported pandas code for query/eval kwargs","Keep query expressions limited to column references"],"tags":["python","apache-beam","dataframe","query","not-implemented"],"backgroundTag":"unsupported-operation","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"}