GitHub user skparkes opened a pull request:
https://github.com/apache/spark/pull/12251
[SPARK-13842][PYSPARK] pyspark.sql.types.StructType accessor enhancements
## What changes were proposed in this pull request?
Expand the possible ways to interact with the contents of a
`pyspark.sql.types.StructType` instance.
## How was this patch tested?
Extended the unit test coverage in the accompanying `tests.py`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/skparkes/spark pyspark-structtype-enhance
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12251.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #12251
----
commit 90207c4a29bae033ec4c144faba6a5cd7ff4071e
Author: Sheamus K. Parkes <[email protected]>
Date: 2016-04-08T01:41:43Z
Expand pyspark.sql.types.StructType tests.
Do this to cover the anticipated new APIs.
commit 139243aae61ad97f11c32a512337ca9de857719e
Author: Sheamus K. Parkes <[email protected]>
Date: 2016-04-08T01:43:48Z
Expand pyspark.sql.types.StructType accessors.
Do this to support more of the Pythonic "magic" methods.
commit 03931159ca433066089087fee7a50ef6ebdeb220
Author: Sheamus K. Parkes <[email protected]>
Date: 2016-04-08T01:47:55Z
Dogfood new __iter__ in pyspark.sql.types.StructField.
Do this because the more direct syntax is now available.
commit 831f03a3098d0e165703db6be0f4d76ef4893667
Author: Sheamus K. Parkes <[email protected]>
Date: 2016-04-08T01:53:29Z
Make pyspark.sql.types.StructType attributes lazier.
Do this so there is less chance for someone to get the stateful
attributes out of sync.
----
---
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]