You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "benkonz (via GitHub)" <gi...@apache.org> on 2024/04/01 18:29:57 UTC

Re: [PR] python sdk: fix several bugs regarding avto <-> beam schema conversion [beam]

benkonz commented on code in PR #30770:
URL: https://github.com/apache/beam/pull/30770#discussion_r1546688503


##########
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:
   @ahmedabu98 added the annotation to the test. Should that have fixed the CI checks? It looks like they are still failing with
   
   ```
   E       RuntimeError: /runner/_work/beam/beam/sdks/python/test-suites/tox/py38/build/srcs/sdks/python/target/.tox-py38-cloud/py38-cloud/lib/sdks/java/extensions/sql/expansion-service/build/libs/beam-sdks-java-extensions-sql-expansion-service-2.56.0-SNAPSHOT.jar not found. Please build the server with ...
   ```



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org