Shiv22Wabale commented on code in PR #17279:
URL: https://github.com/apache/beam/pull/17279#discussion_r844522034


##########
sdks/python/apache_beam/io/parquetio_test.py:
##########
@@ -314,6 +348,28 @@ def test_sink_transform(self):
             | Map(json.dumps)
         assert_that(readback, equal_to([json.dumps(r) for r in self.RECORDS]))
 
+  def test_sink_transform_compliant_nested_type(self):
+    if ARROW_MAJOR_VERSION < 4:
+      return unittest.skip(
+          'Writing with compliant nested type is only '
+          'supported in pyarrow 4.x and above')
+    with TemporaryDirectory() as tmp_dirname:
+      path = os.path.join(tmp_dirname + 'tmp_filename')
+      with TestPipeline() as p:
+        _ = p \
+        | Create(self.RECORDS_NESTED) \
+        | WriteToParquet(
+            path, self.SCHEMA_NESTED, num_shards=1,
+            shard_name_template='', use_compliant_nested_type=True)
+      with TestPipeline() as p:
+        # json used for stable sortability
+        readback = \
+            p \
+            | ReadFromParquet(path) \

Review Comment:
   We just need it for writer. 
   The ReadFromParquet would just use the schema in the parquet file and 
doesn't require any external indicator/flag to read the parquet with compliant 
nested fields.
   
   And we'll be using different consumer other than ReadFromParquet but I don't 
think we need any changes from reader side.



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