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

[SPARK-41871][CONNECT] DataFrame hint parameter can be str, float or int #39393

Closed
wants to merge 10 commits into from

Conversation

techaddict
Copy link
Contributor

What changes were proposed in this pull request?

Spark Connect DataFrame hint parameter can be str, list, float, or int. This is done in parity with pyspark DataFrame.hint

Why are the changes needed?

For parity

Does this PR introduce any user-facing change?

yes, allows more types as parameters.

How was this patch tested?

Enabling existing tests

Copy link
Contributor

@itholic itholic left a comment

Choose a reason for hiding this comment

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

Looks pretty good otherwise

python/pyspark/sql/connect/dataframe.py Show resolved Hide resolved
HyukjinKwon
HyukjinKwon previously approved these changes Jan 4, 2023
@HyukjinKwon HyukjinKwon dismissed their stale review January 4, 2023 23:47

Actually Spark Connect does not have _jdf

@techaddict
Copy link
Contributor Author

@HyukjinKwon
After spending some time with this, looks like the change is much bigger
Proto Message Hint expected parameters to be repeated literal
https://github.com/apache/spark/blob/master/connector/connect/common/src/main/protobuf/spark/connect/relations.proto#L698-L710

adding list to this would require more changes in proto definition, I'm not super familiar with proto3, but it doesn't support extending and we can't do repeated oneof either.

@HyukjinKwon
Copy link
Member

yeah that's fine.

@techaddict techaddict changed the title [SPARK-41871][CONNECT] DataFrame hint parameter can be str, list, float or int [SPARK-41871][CONNECT] DataFrame hint parameter can be str, float or int Jan 5, 2023
@HyukjinKwon
Copy link
Member

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants