Skip to content

Dictionary-encoded Timestamp / TimestampNTZ not handled in extract_date_part #3324

@vigneshsiva11

Description

@vigneshsiva11

Describe the problem

While working on #3278, we noticed that extract_date_part only matches
DataType::Timestamp(_, None) and DataType::Timestamp(_, Some(_)).

Dictionary-encoded timestamps (e.g. DataType::Dictionary(_, Timestamp))
would currently fall into the error branch.

This may affect Iceberg tables where timestamp columns are often dictionary-encoded.

Expected behavior

extract_date_part should correctly handle dictionary-backed Timestamp and TimestampNTZ inputs,
similar to other Spark expressions.

Context

This was discussed during review of #3278 and is intentionally tracked separately
to keep that PR focused.

Proposed follow-up work

  • Add dictionary-aware handling in extract_date_part
  • Add a regression test (likely Spark-side) covering dictionary-encoded TimestampNTZ

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions