derrickaw commented on code in PR #38236:
URL: https://github.com/apache/beam/pull/38236#discussion_r3169887557
##########
sdks/python/apache_beam/yaml/yaml_mapping.py:
##########
@@ -636,8 +672,17 @@ def _PyJsFilter(
error_handling: Whether and where to output records that throw errors when
the above expressions are evaluated.
""" # pylint: disable=line-too-long
- keep_fn = _as_callable_for_pcoll(pcoll, keep, "keep", language or 'generic')
- return pcoll | beam.Filter(keep_fn)
+ if language == 'javascript':
+ if isinstance(keep, str):
+ keep = {'expression': keep}
+ udf_code, function_name = _get_javascript_udf_code(
+ [f.name for f in schema_from_element_type(pcoll.element_type).fields],
Review Comment:
It is already
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]