LibenHailu opened a new issue, #41164:
URL: https://github.com/apache/beam/issues/41164
### What happened?
Several small bugs exist in the Beam YAML Join and Testing modules
(`apache_beam.yaml.yaml_join` and `apache_beam.yaml.yaml_testing`):
1. **`yaml_join._parse_fields` rejects `'*'` even though `_SqlJoinTransform`
documents it**:
- The docstring of `_SqlJoinTransform` specifies that values in the
`fields` mapping can be a dictionary, a list of fields, *"or an `'*'`
indicating all fields in the input will be outputted"*. However,
`_parse_fields` only accepts `list` or `dict` and raises `ValueError` when
`'*'` is provided.
2. **`yaml_join._is_connected` raises unhandled `StopIteration` on empty
`equalities: []`**:
- When `equalities: []` is passed to `_validate_equalities`,
`_is_connected([], len(pcolls))` is called with an empty `graph` (`{}`) and
`next(iter(graph))` raises `StopIteration` instead of returning `False` so
`_validate_equalities` can raise `ValueError`.
3. **`yaml_testing.validate_test_spec` and `yaml_testing.create_test` error
formatting bugs**:
- In `validate_test_spec`, `got {type(attr_type)}` prints the type of the
attribute name string (`<class 'str'>`) instead of `type(attr)`.
- In `create_test`, `raise ValueError('Ambiguous unnamed transform
{transform["type"]}')` is missing the `f`-string prefix.
### Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
### Issue Components
- [x] Component: Python SDK
- [x] Component: Beam YAML
--
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]