danepitkin commented on code in PR #35656:
URL: https://github.com/apache/arrow/pull/35656#discussion_r1223520414


##########
python/pyarrow/tests/parquet/test_dataset.py:
##########
@@ -1313,6 +1312,15 @@ def _test_write_to_dataset_with_partitions(base_path,
     # Partitioned columns become 'categorical' dtypes
     for col in partition_by:
         output_df[col] = output_df[col].astype('category')
+
+    if schema:
+        expected_date_type = 
schema.field_by_name('date').type.to_pandas_dtype()
+    else:
+        # Arrow to Pandas v2 will convert date32 to [ms]. Pandas v1 will always
+        # silently coerce to [ns] due to non-[ns] support.
+        expected_date_type = 'datetime64[ms]'
+    output_df["date"] = output_df["date"].astype(expected_date_type)

Review Comment:
   There is no issue with reading datsets, I just had to update this test to 
check if the resulting pandas df matched the overridden schema types if a 
schema is applied. There is probably a better way to check then what I've done 
here..



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