Skip to content

doc: add implementation guidelines for datafusion-spark - #24140

Open
Jefffrey wants to merge 1 commit into
apache:mainfrom
Jefffrey:spark-guidelines
Open

doc: add implementation guidelines for datafusion-spark#24140
Jefffrey wants to merge 1 commit into
apache:mainfrom
Jefffrey:spark-guidelines

Conversation

@Jefffrey

@Jefffrey Jefffrey commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Set some guidelines for how UDFs should be implemented in datafusion-spark. This is to align us on what we expect from UDFs, making it easier for contributors & reviewers alike.

@github-actions github-actions Bot added the spark label Aug 6, 2026
@Jefffrey

Jefffrey commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

I didn't receive an answer regarding datatypes so I just put a view here; am open to changing it if others have differing opinions.

cc @comphead @andygrove @coderfender

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.04%. Comparing base (70c26a0) to head (fe20858).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24140      +/-   ##
==========================================
- Coverage   81.04%   81.04%   -0.01%     
==========================================
  Files        1105     1105              
  Lines      380163   380163              
  Branches   380163   380163              
==========================================
- Hits       308111   308107       -4     
- Misses      53834    53836       +2     
- Partials    18218    18220       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andygrove andygrove left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks @Jefffreyl. It would be nice if we could update this doc to link to #23893 once it is merged.

and compatibility.

Therefore, direct invocation tests should only be used to verify that the function is correctly implemented.
### `simplify()`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a challenge here on how to write sql logic tests to test both the simplify and the invoke_with_args implementations.

Do you have suggestions on how to address this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants