cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

UNSUPPORTED_TIME_TYPE despite 18.1 runtime?

js5
New Contributor II

Hello,

I have tried using TimeType data type which is supported since Spark 4.1:

https://spark.apache.org/docs/latest/sql-ref-datatypes.html

I am unfortunately still getting UNSUPPORTED_TIME_TYPE error when trying to run display() on a pandas dataframe containing time objects. Is this expected? If so, are there any plans for incorporating this new data type in databricks? Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @js5,

This is expected today on Databricks. You can check this out for reference.

Spark 4.1 introduces a standard TIME type (TimeType) in the SQL type system, and Databricks runtimes based on Spark 4.x already expose it at the engine level (for example, via functions like current_time). However, Databricks still treats TIME as unsupported in several higherโ€‘level components, including the path that display() uses when converting a pandas DataFrame to a Spark DataFrame. Thatโ€™s why you see [UNSUPPORTED_TIME_TYPE] The data type TIME is not supported. even though the Spark docs show TimeType.

Full platformโ€‘level support for TIME is being rolled out progressively... You can see the underlying Spark work landing in the Databricks Runtime 17.x release notes (search for โ€œTimeTypeโ€ and โ€œTIME data typeโ€ there). 

 https://docs.databricks.com/en/archive/runtime-release-notes/17.0
 https://docs.databricks.com/en/archive/runtime-release-notes/17.1
 https://docs.databricks.com/en/archive/runtime-release-notes/17.2

Until thatโ€™s complete, a practical workaround is to convert pure timeโ€‘ofโ€‘day columns to STRING in pandas before calling display()

If this answer resolves your question, could you mark it as โ€œAccept as Solutionโ€? That helps other users quickly find the correct fix.

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***

View solution in original post

1 REPLY 1

Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @js5,

This is expected today on Databricks. You can check this out for reference.

Spark 4.1 introduces a standard TIME type (TimeType) in the SQL type system, and Databricks runtimes based on Spark 4.x already expose it at the engine level (for example, via functions like current_time). However, Databricks still treats TIME as unsupported in several higherโ€‘level components, including the path that display() uses when converting a pandas DataFrame to a Spark DataFrame. Thatโ€™s why you see [UNSUPPORTED_TIME_TYPE] The data type TIME is not supported. even though the Spark docs show TimeType.

Full platformโ€‘level support for TIME is being rolled out progressively... You can see the underlying Spark work landing in the Databricks Runtime 17.x release notes (search for โ€œTimeTypeโ€ and โ€œTIME data typeโ€ there). 

 https://docs.databricks.com/en/archive/runtime-release-notes/17.0
 https://docs.databricks.com/en/archive/runtime-release-notes/17.1
 https://docs.databricks.com/en/archive/runtime-release-notes/17.2

Until thatโ€™s complete, a practical workaround is to convert pure timeโ€‘ofโ€‘day columns to STRING in pandas before calling display()

If this answer resolves your question, could you mark it as โ€œAccept as Solutionโ€? That helps other users quickly find the correct fix.

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***