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

    https://github.com/apache/spark/pull/18444#discussion_r128128561
  
    --- Diff: core/src/main/scala/org/apache/spark/api/python/SerDeUtil.scala 
---
    @@ -55,13 +55,12 @@ private[spark] object SerDeUtil extends Logging {
         //    {'d', sizeof(double), d_getitem, d_setitem},
         //    {'\0', 0, 0, 0} /* Sentinel */
         //  };
    -    // TODO: support Py_UNICODE with 2 bytes
         val machineCodes: Map[Char, Int] = if 
(ByteOrder.nativeOrder().equals(ByteOrder.BIG_ENDIAN)) {
    -      Map('c' -> 1, 'B' -> 0, 'b' -> 1, 'H' -> 3, 'h' -> 5, 'I' -> 7, 'i' 
-> 9,
    +      Map('B' -> 0, 'b' -> 1, 'H' -> 3, 'h' -> 5, 'I' -> 7, 'i' -> 9,
             'L' -> 11, 'l' -> 13, 'f' -> 15, 'd' -> 17, 'u' -> 21
           )
         } else {
    -      Map('c' -> 1, 'B' -> 0, 'b' -> 1, 'H' -> 2, 'h' -> 4, 'I' -> 6, 'i' 
-> 8,
    +      Map('B' -> 0, 'b' -> 1, 'H' -> 2, 'h' -> 4, 'I' -> 6, 'i' -> 8,
    --- End diff --
    
    `c` was supported by spark 2.2.0:
    ```python
    >>> row = Row(myarray=array('c', ["a"]))
    >>> df = spark.createDataFrame([row])
    >>> df.first()["myarray"][0]
    u'a'
    ```
    
    This support I think was because array was infered the same way as list. 
But after we make changes on the type infer of array, we have to change this 
accordingly to bring it back to work. 


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