Skip to content

Conversation

@KKould
Copy link
Member

@KKould KKould commented Nov 25, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Nov 25, 2025
@KKould KKould requested a review from TCeason November 25, 2025 10:39
@KKould KKould marked this pull request as ready for review November 25, 2025 10:39
@KKould KKould requested a review from drmingdrmer as a code owner November 25, 2025 10:39
Copy link
Member

@drmingdrmer drmingdrmer left a 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

@KKould KKould self-assigned this Nov 27, 2025
@KKould
Copy link
Member Author

KKould commented Nov 27, 2025

@codex review

@KKould KKould requested a review from Copilot November 27, 2025 05:57
Copilot finished reviewing on behalf of KKould November 27, 2025 06:01
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Copy link
Contributor

Copilot AI left a 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_on field to the UserDefinedFunction struct and protobuf schema
  • Updates all UDF creation paths to initialize both created_on and update_on timestamps
  • 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.

@KKould KKould merged commit 783fef7 into databendlabs:main Nov 27, 2025
165 of 171 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature this PR introduces a new feature to the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: support update_on field for udf

4 participants