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-49087][SQL][CONNECT] Distinguish UnresolvedFunction calling internal functions #49274

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

xupefei
Copy link
Contributor

@xupefei xupefei commented Dec 23, 2024

What changes were proposed in this pull request?

This PR introduces a new Protobuf field is_internal to UnresolvedFunction message. This field is used to carry the info on whether an UnresolvedFunction is calling an internal function (using the Column#internalFn API), so that the Connect server could act appropriately:

  • If true, then (inside Catalyst) mark the function as internal.
  • If false, then mark the function as external (public or user-defined).
  • (Current behaviour) If not set, then look it up in the internal registry: mark as "internal" if found, "external" otherwise.

TODO: SPARK-50658: apply the same change to the Spark Connect Python client.

Why are the changes needed?

Tidy up the code and make our first-party Connect client adhere to the best practices.

Does this PR introduce any user-facing change?

Nope.

How was this patch tested?

New test is added.

Was this patch authored or co-authored using generative AI tooling?

Copilot helped generate protobuf comments and repeated test codes.

@xupefei xupefei changed the title [SPARK-49087] Distinguish UnresolvedFunction calling internal functions [SPARK-49087][SQL][Connect] Distinguish UnresolvedFunction calling internal functions Dec 23, 2024
@HyukjinKwon HyukjinKwon changed the title [SPARK-49087][SQL][Connect] Distinguish UnresolvedFunction calling internal functions [SPARK-49087][SQL][CONNECT] Distinguish UnresolvedFunction calling internal functions Dec 23, 2024
# Conflicts:
#	connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/internal/columnNodeSupport.scala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants