Skip to content

docs: missing documentation for XOR and IS_TRUE boolean scalar functions #3293

@sundy-li

Description

@sundy-li

What's Missing

Two boolean scalar functions registered in the Databend function registry have no documentation:

  • XOR(a, b) — returns the logical exclusive-or of two boolean values
  • IS_TRUE(expr) — returns TRUE if the expression is TRUE (not NULL, not FALSE)

Source File

/workspace/databend/src/query/functions/src/scalars/boolean.rs

Relevant registrations:

registry.register_passthrough_nullable_2_arg::<BooleanType, BooleanType, BooleanType, _, _>(
    "xor",
    ...
);
registry.register_1_arg_core::<BooleanType, BooleanType, _, _>(
    "is_true",
    ...
);
registry.register_1_arg_core::<NullableType<BooleanType>, BooleanType, _, _>(
    "is_true",
    ...
);

What They Do

  • XOR(a, b) — logical XOR: returns TRUE when exactly one of the two boolean arguments is TRUE. Both arguments are non-nullable booleans.
  • IS_TRUE(expr) — returns TRUE only when the input is a non-NULL TRUE value. Accepts both nullable and non-nullable booleans, always returns a non-nullable boolean. Useful for safely testing nullable boolean columns without NULL propagation.

Suggested Doc Location

/docs/en/sql-reference/20-sql-functions/03-conditional-functions/ (alongside if.md, iff.md, is-null.md, etc.)

Both functions could be documented in a single page xor-is-true.md or as two separate pages xor.md and is-true.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions