gaogaotiantian commented on code in PR #55961:
URL: https://github.com/apache/spark/pull/55961#discussion_r3262572783


##########
python/pyspark/sql/tests/arrow/test_arrow_grouped_map.py:
##########
@@ -101,6 +101,32 @@ def func(key, group):
             actual2 = grouped_df.applyInArrow(func_variation, "id long, value 
long").collect()
             self.assertEqual(actual2, expected)
 
+    def test_apply_in_arrow_large_var_types(self):
+        # SPARK-56929: when useLargeVarTypes=true, the expected schema 
computed by
+        # worker.py for result validation must also use 
large_string/large_binary,
+        # otherwise verify_arrow_result raises a spurious 
RESULT_COLUMN_TYPES_MISMATCH.
+        data = [(0, "foo", b"foo"), (0, "bar", b"bar"), (1, None, None), (1, 
"baz", b"baz")]
+        df = self.spark.createDataFrame(data, "id long, s string, b binary")
+        schema = "id long, s string, b binary"
+
+        def func(table):
+            assert table.schema.field("s").type == pa.large_string()

Review Comment:
   Let's use `is` 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]


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

Reply via email to