Skip to content

[DOCS] Document some caveats of UDF/UDAs#6478

Merged
mihaibudiu merged 1 commit into
feldera:mainfrom
mihaibudiu:issue4949
Jun 15, 2026
Merged

[DOCS] Document some caveats of UDF/UDAs#6478
mihaibudiu merged 1 commit into
feldera:mainfrom
mihaibudiu:issue4949

Conversation

@mihaibudiu

Copy link
Copy Markdown
Contributor

Until the compiler can check whether a UDF has changed (which today it doesn't) we at least document some limitations that the users are responsible for.

Fixes #4949

Checklist

  • Documentation updated

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@mihaibudiu mihaibudiu enabled auto-merge June 15, 2026 21:15
@mihaibudiu mihaibudiu requested a review from anandbraman June 15, 2026 21:15
@mihaibudiu mihaibudiu added this pull request to the merge queue Jun 15, 2026

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Useful warnings. APPROVE with three small docs-polish nits inline.

by returning a `Result::Err()` ([see below](#return-types)). This ensures that errors are
propagated in a controlled manner and can be handled by the calling code.

* The compiler assumes that the semantics of a user-defined function does not change between

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Grammar: "semantics" is plural, so "do not change", "may lead to incorrect results" reads fine but the head noun needs "do". Same fix on line 423 for the UDA copy.

Suggested: "The compiler assumes that the semantics of a user-defined function do not change between pipeline restarts."

library function names.
library function names. Future additions to the SQL library may
introduce functions that clash with user-defined function names. We
recommend users to use function names that are unlikely to

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"We recommend users to use ..." is awkward. Either "We recommend that users use ..." or "We recommend choosing function names that ..." reads better.

data sources, or other sources of non-determinism.

* UDAs are compiled into native binary code and executed directly within the address space of
the pipeline. Therefore, only trusted code should be included in UDAs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new UDA danger block drops two things that the UDF block above has and that apply just as much to UDAs:

  1. The "no panics / no undefined behavior / return Result::Err on runtime errors" guidance (lines 41-45 in the existing UDF block). Crashes from a UDA inside the pipeline address space are at least as bad as from a UDF.
  2. The pointer to issue [RFC] Non-deterministic operator #2619 inviting feedback on non-deterministic use cases — a UDA author hitting this is just as likely to want to comment there.

Worth duplicating both into the UDA block, or factoring the shared warnings into a single block introduced as "applies to UDFs and UDAs".

Merged via the queue into feldera:main with commit 00e33ec Jun 15, 2026
1 check passed
@mihaibudiu mihaibudiu deleted the issue4949 branch June 15, 2026 22:47
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.

[SQL] Changing a UDF definition will break bootstrapping

3 participants