Skip to content

fix(query): handle malformed UDF script metadata#19983

Open
KKould wants to merge 1 commit into
databendlabs:mainfrom
KKould:fix/udf-script-metadata-toml-error
Open

fix(query): handle malformed UDF script metadata#19983
KKould wants to merge 1 commit into
databendlabs:mainfrom
KKould:fix/udf-script-metadata-toml-error

Conversation

@KKould

@KKould KKould commented Jun 9, 2026

Copy link
Copy Markdown
Member

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

Summary

  • Return a semantic error when UDF script metadata contains malformed TOML instead of panicking during dependency extraction.
  • Apply the same error propagation to script UDF runtime dependency extraction so malformed # /// script metadata is handled consistently.
  • Add regression coverage for malformed dependencies = [ metadata.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why
cargo fmt --package databend-common-sql --package databend-query-script-udf-support
cargo test -p databend-common-sql test_extract_script_metadata_deps_returns_error_for_malformed_toml
cargo test -p databend-query-script-udf-support --features script-udf test_extract_deps_returns_error_for_malformed_toml
git diff --check

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-bugfix this PR patches a bug in codebase label Jun 9, 2026
@KKould KKould force-pushed the fix/udf-script-metadata-toml-error branch from 56c4795 to f1483ab Compare June 9, 2026 17:47
@KKould KKould self-assigned this Jun 9, 2026
@KKould KKould requested a review from sundy-li June 9, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix this PR patches a bug in codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant