Jefffrey commented on code in PR #5362:
URL: https://github.com/apache/arrow-rs/pull/5362#discussion_r1477158222


##########
parquet/src/file/metadata.rs:
##########
@@ -349,7 +349,13 @@ impl RowGroupMetaData {
 
     /// Method to convert from Thrift.
     pub fn from_thrift(schema_descr: SchemaDescPtr, mut rg: RowGroup) -> 
Result<RowGroupMetaData> {
-        assert_eq!(schema_descr.num_columns(), rg.columns.len());
+        if schema_descr.num_columns() != rg.columns.len() {
+            return Err(general_err!(
+                "Column length mismatch. Schema has {} columns while Row Group 
has {}",

Review Comment:
   ```suggestion
                   "Column count mismatch. Schema has {} columns while Row 
Group has {}",
   ```
   
   nit: count seems a better descriptor than length (column length made me 
first think of size of column, instead of number of columns)



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