Skip to content

fix: preserve nullary function metadata - #106

Merged
osipovartem merged 1 commit into
embucket-sync-df55.0.0from
information-schema-nullary-variadic-metadata
Sep 18, 2026
Merged

osipovartem merged 1 commit into
embucket-sync-df55.0.0from
information-schema-nullary-variadic-metadata

Conversation

@osipovartem

Copy link
Copy Markdown
Collaborator

Which issue does this PR close?

  • Follow-up for complete information_schema function metadata.

Rationale for this change

Functions whose signatures accept zero arguments can currently produce only an untyped placeholder row when TypeSignature::get_example_types() returns no representative input types. This causes nullary scalar/window functions and aggregate signatures such as COUNT() to lose their return type and arity metadata. Nested variadic signatures inside OneOf are also reported as non-variadic.

What changes are included in this PR?

  • Resolve a return field for empty argument lists only when the signature explicitly supports zero arguments.
  • Apply the same behavior to scalar, aggregate, and window UDF metadata.
  • Detect variadic signatures recursively through TypeSignature::OneOf.
  • Preserve the variadic marker on OUT-only metadata rows.

The work is limited to information-schema construction and does not affect expression evaluation or query execution hot paths.

Are these changes tested?

SQLLogicTest coverage verifies nullary scalar (current_date), aggregate/nested variadic (count), and window (rank) metadata, including native SHOW FUNCTIONS output.

  • cargo test --profile=ci --test sqllogictests -- information_schema
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check

Are there any user-facing changes?

Yes. information_schema.routines, information_schema.parameters, and SHOW FUNCTIONS now report return types and variadic arity for zero-argument-compatible functions instead of NULL/incomplete metadata. There are no public API changes.

@osipovartem
osipovartem merged commit 557d29a into embucket-sync-df55.0.0 Sep 18, 2026
6 of 16 checks passed
@osipovartem
osipovartem deleted the information-schema-nullary-variadic-metadata branch September 18, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant