Skip to content

Consider adding TypeSignatureClass::Any variant #19438

Description

@Jefffrey

Is your feature request related to a problem or challenge?

Considering a PR like this: #19435

It needs to accept an arbitrary expression for the first argument but an optional string argument for the second. There isn't really a good way to represent this in the current signature API, without doing the checks inside the function itself (as is done).

Describe the solution you'd like

Add an Any variant so we can specify a signature like TypeSignatureClass::Any, TypeSignatureClass::Native(logical_string()) to encode this information in the signature.

Describe alternatives you've considered

No response

Additional context

/// Represents the class of types that can be used in a function signature.
///
/// This is used to specify what types are valid for function arguments in a more flexible way than
/// just listing specific DataTypes. For example, TypeSignatureClass::Timestamp matches any timestamp
/// type regardless of timezone or precision.
///
/// Used primarily with [`TypeSignature::Coercible`] to define function signatures that can accept
/// arguments that can be coerced to a particular class of types.
#[derive(Debug, Clone, Eq, PartialEq, PartialOrd, Hash)]
pub enum TypeSignatureClass {
Timestamp,
Time,
Interval,
Duration,
Native(LogicalTypeRef),
Integer,
Float,
Decimal,
Numeric,
/// Encompasses both the native Binary/LargeBinary types as well as arbitrarily sized FixedSizeBinary types
Binary,
}

Activity

  1. added theissue type on Dec 21, 2025
  2. self-assigned this
    on Dec 22, 2025
  3. Yuvraj-cyborg commented on Dec 24, 2025

    @Yuvraj-cyborg
    Contributor

    hey @Jefffrey can I work on it ??

  4. Yuvraj-cyborg commented on Dec 24, 2025

    @Yuvraj-cyborg
    Contributor

    take

  5. Jefffrey commented on Dec 24, 2025

    @Jefffrey
    ContributorAuthor

    Hi @Yuvraj-cyborg , I'm already planning to work on this.

  6. added a commit that references this issue on Dec 30, 2025
    13f3843
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions