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

    https://github.com/apache/spark/pull/1774#discussion_r15827707
  
    --- Diff: python/pyspark/sql.py ---
    @@ -269,7 +269,7 @@ def __repr__(self):
     class StructType(DataType):
         """Spark SQL StructType
     
    -    The data type representing rows.
    +    The data type representing tuple or list values.
    --- End diff --
    
    This inconsistency is introduced by the difference between the JVM Row and 
Python Row. For a JVM Row (both Scala and Java), fields in it are nameless and 
we need to extract values by providing ordinals. However, a field in a Python 
Row has its name. Right now, in Python, if users have an `RDD[Row]`, they need 
to use `inferSchema` to create a `SchemaRDD`. If they have an `RDD[tuple]` or 
`RDD[list]`, they need to use `applySchema`.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to