Skip to content

feat(datafusion): add BlobDescriptor SQL helper functions#525

Open
QuakeWang wants to merge 1 commit into
apache:mainfrom
QuakeWang:blob-sql-functions
Open

feat(datafusion): add BlobDescriptor SQL helper functions#525
QuakeWang wants to merge 1 commit into
apache:mainfrom
QuakeWang:blob-sql-functions

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

DataFusion already had BlobDescriptor serialization and resolution support, but SQLContext did not expose the Java-compatible path_to_descriptor and descriptor_to_string SQL APIs. Queries using either the canonical names or sys.* aliases therefore failed as unknown functions.

Brief change log

  • add path_to_descriptor and descriptor_to_string with sys.* aliases
  • register both functions in SQLContext::new
  • match Java serialization, string formatting, NULL, and invalid-input behavior
  • document the SQL APIs

Tests

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --workspace --features fulltext,vortex -- -D warnings
  • cargo test -p paimon --lib blob_descriptor
  • cargo test -p paimon-datafusion --test blob_descriptor_functions --test blob_tests --test sql_context_tests

API and Format

Adds four SQL function names and Display for BlobDescriptor. No storage format change.

Documentation

Updated docs/src/sql.md.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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.

1 participant