Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brainstorm decorators useful for PySpark programmers #144

Open
MrPowers opened this issue Oct 21, 2023 · 1 comment
Open

Brainstorm decorators useful for PySpark programmers #144

MrPowers opened this issue Oct 21, 2023 · 1 comment

Comments

@MrPowers
Copy link
Owner

Python decorators and nice and allow for some beautiful code.

PySpark programmers ofter write DataFrame transformations that change the schema of a DataFrame as follows:

  • adding columns
  • removing columns
  • other changes to schema

This pull request proposes adding some decorators to the quinn public interface. Decorators could provide PySpark programmers with a really nice programming experience.

What would be the ideal decorator end state for PySpark programmers? Or are decorators limited for common PySpark programming patterns?

@jeffbrennan
Copy link
Collaborator

I like the idea of using decorators to run validations on a returned DataFrame. It allows programmers to clearly define expected output properties without having to modify their existing functions. Transformations like adding/removing columns or changing the schema tend to be part of the function logic and I don't think decorators make as much sense for that use case. Decorators could allow PySpark programmers to abstract validations away from core transformation logic.

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

No branches or pull requests

2 participants