wyzhao commented on a change in pull request #8672:
URL: https://github.com/apache/arrow/pull/8672#discussion_r527096473



##########
File path: python/pyarrow/parquet.py
##########
@@ -1237,6 +1264,8 @@ def validate_schemas(self):
             if self.common_metadata is not None:
                 self.schema = self.common_metadata.schema
             else:
+                if not self.pieces:
+                    raise ValueError('No partition is found.')

Review comment:
       If no partition satisfies the filters, the next line will throw 
IndexOutOfRange error:
                   self.schema = self.pieces[0].get_metadata().schema
   I add the two lines to make the error more meaningful.
   




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to