Skip to content

[BUG] Date fields within ARRAY<STRUCT> types are serialized as Epoch Days (integers) rather than ISO-8601 strings. #1247

@pradeepDemoscanner

Description

@pradeepDemoscanner

Describe the bug
A clear and concise description of what the bug is.

When querying a column with a nested schema—specifically an Array of Structs containing a Date type—the result set returns the raw internal integer representation (number of days since 1970-01-01) instead of the expected YYYY-MM-DD format. This behavior breaks downstream consumers (like Power BI, Tableau, or custom APIs) that expect standard date strings within JSON/Struct outputs.

To Reproduce
Steps to reproduce the behavior:

  1. Create a table with a nested date:
    CREATE OR REPLACE TABLE bug_repro AS SELECT ARRAY(STRUCT(CAST('2026-02-03' AS DATE) AS event_date)) AS nested_data;

  2. Query the table:
    SELECT nested_data FROM bug_repro;

  3. Observed Result: [{"event_date": 20490}]

Expected behavior
A clear and concise description of what you expected to happen.
Expected Result: [{"event_date": "2026-02-03"}] when queried using jar databricks-jdbc

Screenshots
If applicable, add screenshots to help explain your problem.
When executed the query in Azure databricks getting the result as
[{"event_date":"2026-02-03"}]

Client side logs
If available, share redacted client side logs

Client Environment (please complete the following information):

  • OS: [e.g. Windows] Mac
  • Java version [e.g. Java 21]: Java 21
  • Java vendor [e.g. OpenJDK]: corretto-21
  • Driver Version [e.g. 3.1.1]: 3.2.1
  • BI Tool (if used) [e.g. DBeaver]
  • BI Tool version (if applicable) [e.g. 24.3.5]

Additional context
Add any other context about the problem here.

Metadata

Metadata

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