Github user zasdfgbnm commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18444#discussion_r124531036
  
    --- Diff: python/pyspark/sql/tests.py ---
    @@ -2259,6 +2261,60 @@ def test_BinaryType_serialization(self):
             df = self.spark.createDataFrame(data, schema=schema)
             df.collect()
     
    +    # test for SPARK-16542
    +    def test_array_types(self):
    +        int_types = set(['b', 'h', 'i', 'l'])
    +        float_types = set(['f', 'd'])
    +        unsupported_types = set(array.typecodes) - int_types - float_types
    +
    +        def collected(a):
    +            row = Row(myarray=a)
    +            rdd = self.sc.parallelize([row])
    +            df = self.spark.createDataFrame(rdd)
    +            return df.collect()[0]["myarray"][0]
    +        # test whether pyspark can correctly handle int types
    +        for t in int_types:
    +            # test positive numbers
    +            a = array.array(t, [1])
    +            while True:
    --- End diff --
    
    Let me figure that out. This patch was more than a year ago and I forget 
what was happening.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to