-
Notifications
You must be signed in to change notification settings - Fork 837
feat: add column update_on for user functions table #19018
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
Conversation
drmingdrmer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drmingdrmer reviewed 16 of 21 files at r1.
Reviewable status: 16 of 21 files reviewed, all discussions resolved
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds an update_on timestamp field to the user functions table to track when a UDF was last modified, addressing issue #14558. The field is added alongside the existing created_on timestamp.
- Adds
update_onfield to theUserDefinedFunctionstruct and protobuf schema - Updates all UDF creation paths to initialize both
created_onandupdate_ontimestamps - Modifies the system table schema and queries to include the new column
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/meta/protos/proto/udf.proto | Adds optional update_on field (field 11) to UserDefinedFunction protobuf message |
| src/meta/proto-conv/src/udf_from_to_protobuf_impl.rs | Implements serialization/deserialization for update_on field, defaulting to created_on when absent for backward compatibility |
| src/meta/proto-conv/src/util.rs | Documents the schema change as version 160 in the metadata changelog |
| src/meta/proto-conv/tests/it/*.rs | Updates existing tests to include update_on field, setting it equal to created_on for backward compatibility tests |
| src/meta/proto-conv/tests/it/v160_udf_update_on.rs | Adds new test specifically for the update_on field with different timestamps for created and updated times |
| src/meta/proto-conv/tests/it/main.rs | Registers the new v160 test module |
| src/meta/app/src/principal/user_defined_function.rs | Adds update_on field to struct and updates helper functions to set both timestamps |
| src/query/sql/src/planner/binder/udf.rs | Sets both created_on and update_on to current time when binding UDF definitions |
| src/query/sql/src/planner/binder/show.rs | Updates SHOW USER FUNCTIONS query to include the new update_on column |
| src/query/storages/system/src/user_functions_table.rs | Adds update_on column to the system table schema and populates it from UDF metadata |
| src/query/service/tests/it/storages/testdata/columns_table.txt | Updates test snapshot to include the new column in system.user_functions table |
| tests/suites/0_stateless/20+_others/20_0016_udf_timestamp.result | Updates test results to show the new update_on column in query output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Tests
Type of change
This change is