TYPEOF()

All functions > METADATA > TYPEOF()

Returns the type of the given expression in FeatureQL.

Signatures

Returns: A string representing the FeatureQL type name

TYPEOF(expr: T) → VARCHAR
sql
ParameterTypeRequiredDescription
exprTYesThe expression to get the type of

Notes

  • Returns the FeatureQL type name as a string
  • Useful for dynamic type checking and debugging
  • Type is determined at compile time
  • Returns FeatureQL-specific type names (e.g., BIGINT, VARCHAR, ARRAY)
  • Can be used in conditional logic based on types
  • Helps with understanding type inference results

See also

Examples

Scalars

FeatureQL
SELECT
    -- Integer literal
    f1 := TYPEOF(1),
    -- String literal
    f2 := TYPEOF('hello')
;
Result
f1 VARCHARf2 VARCHAR
BIGINTVARCHAR

Containers

FeatureQL
SELECT
    -- Array type lists the element type
    f1 := TYPEOF(ARRAY(1, 2))
;
Result
f1 VARCHAR
ARRAY<BIGINT>

Last update at: 2026/06/20 10:08:10