ahmedabu98 commented on code in PR #30770:
URL: https://github.com/apache/beam/pull/30770#discussion_r1561855432
##########
sdks/python/apache_beam/io/avroio_test.py:
##########
@@ -149,17 +151,37 @@ def _run_avro_test(
def test_schema_read_write(self):
with tempfile.TemporaryDirectory() as tmp_dirname:
path = os.path.join(tmp_dirname, 'tmp_filename')
- rows = [beam.Row(a=1, b=['x', 'y']), beam.Row(a=2, b=['t', 'u'])]
+ rows = [beam.Row(a=-1, b=['x', 'y']), beam.Row(a=2, b=['t', 'u'])]
stable_repr = lambda row: json.dumps(row._asdict())
with TestPipeline() as p:
_ = p | Create(rows) | avroio.WriteToAvro(path) | beam.Map(print)
with TestPipeline() as p:
readback = (
p
| avroio.ReadFromAvro(path + '*', as_rows=True)
+ | SqlTransform("SELECT * FROM PCOLLECTION")
Review Comment:
That marker just tells the right test suite to pick it up and run it.
Now we need to make sure the test is skipped for suites that aren't
compatible with running an expansion service. We can add the following, similar
to what is done in sql_test.py:
https://github.com/apache/beam/blob/e33dec69c7cfd01c0b827538e1dad8567e3ff95e/sdks/python/apache_beam/transforms/sql_test.py#L48-L52
--
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]