Skip to content

Conversation

@JoshRosen
Copy link
Contributor

This fixes an exception that prevented users from calling help() on Python DataFrame instances.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this check because getattr can only be called with strings:

>>> foo = []
>>> getattr(foo, 123)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: getattr(): attribute name must be string

@SparkQA
Copy link

SparkQA commented Jan 29, 2015

Test build #26341 has started for PR 4278 at commit 08f95f7.

  • This patch merges cleanly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Row already had this check in its __getattr__ call, so I think it's safe to do the same thing here, too.

@JoshRosen JoshRosen changed the title Fix exception when calling help() on Python DataFrame instances [SPARK-5464] Fix exception when calling help() on Python DataFrame instances Jan 29, 2015
@JoshRosen JoshRosen changed the title [SPARK-5464] Fix exception when calling help() on Python DataFrame instances [SPARK-5464] Fix help() for Python DataFrame instances Jan 29, 2015
@rxin
Copy link
Contributor

rxin commented Jan 29, 2015

cc @davies

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the case that threw an exception. The other two cases below are just to improve our test-coverage, since those classes also have custom __getattr__ methods.

@davies
Copy link
Contributor

davies commented Jan 29, 2015

This looks good to me, thanks for fix them.

@SparkQA
Copy link

SparkQA commented Jan 29, 2015

Test build #26341 has finished for PR 4278 at commit 08f95f7.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/26341/
Test PASSed.

@rxin
Copy link
Contributor

rxin commented Jan 30, 2015

Thanks. merging this in master!

@asfgit asfgit closed this in 0bb15f2 Jan 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants