Skip to content

Add missing scalar functions (union, arrow metadata, get_field, version, row) #1453

@timsaucer

Description

@timsaucer

Summary

Several miscellaneous scalar functions from upstream DataFusion are not exposed in datafusion-python.

Missing Functions

Union type functions:

  • union_extract — extracts a value from a union type by field name
  • union_tag — returns the tag (active field name) of a union type

Arrow metadata/cast functions:

  • arrow_metadata — returns Arrow field metadata
  • arrow_try_cast — attempts to cast an expression, returning null on failure instead of erroring

Other:

  • get_field — extracts a field from a struct by name
  • version — returns the DataFusion version string
  • row — alias for the struct constructor

Upstream Reference

Implementation

  • Rust bindings: crates/core/src/functions.rs
  • Python wrappers: python/datafusion/functions.py

Note: This gap analysis was performed using an AI agent comparing upstream DataFusion v53 documentation against the current datafusion-python codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions