jalpan-randeri commented on a change in pull request #26585:
URL: https://github.com/apache/spark/pull/26585#discussion_r429582109



##########
File path: python/pyspark/sql/tests/test_arrow.py
##########
@@ -415,6 +415,20 @@ def run_test(num_records, num_parts, max_records, 
use_delay=False):
         for case in cases:
             run_test(*case)
 
+    def test_createDateFrame_with_category_type(self):
+        pdf = pd.DataFrame({"A": [u"a", u"b", u"c", u"a"]})
+        pdf["B"] = pdf["A"].astype('category')
+
+        with self.sql_conf({"spark.sql.execution.arrow.pyspark.enabled": 
True}):
+            arrow_df = self.spark.createDataFrame(pdf)
+            result_arrow = arrow_df.toPandas()
+
+        with self.sql_conf({"spark.sql.execution.arrow.pyspark.enabled": 
False}):
+            df = self.spark.createDataFrame(pdf)
+            result_spark = df.toPandas()
+
+        assert_frame_equal(result_spark, result_arrow)
+

Review comment:
       Done, move other test checks here too.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to