shunping commented on code in PR #41154:
URL: https://github.com/apache/beam/pull/41154#discussion_r4529753421


##########
sdks/python/apache_beam/io/textio_test.py:
##########
@@ -1889,6 +1890,49 @@ def check_types(element):
 
         _ = pcoll | beam.Map(check_types)
 
+  def test_float_precision(self):
+    records = [
+        beam.Row(id=1, x=0.1234567890123),
+        beam.Row(id=2, x=1e-11),
+        beam.Row(id=3, x=0.1234567890123456),
+    ]
+
+    def write_and_read(**kwargs):
+      with tempfile.TemporaryDirectory() as dest:
+        with TestPipeline() as p:
+          # pylint: disable=expression-not-assigned
+          p | beam.Create(records) | beam.io.WriteToJson(

Review Comment:
   Nit: have you considered using the following so you don't need the pylint 
hint?
   
   ```python
   _ = p | beam.Create(records) | beam.io.WriteToJson(...)
   ```



-- 
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]

Reply via email to