Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • Connect
    • None

    Description

      import pandas as pd
      from datetime import timedelta
      
      df = self.spark.createDataFrame(pd.DataFrame({"a": [timedelta(microseconds=123)]})) 
      Traceback (most recent call last):
        File "/Users/s.singh/personal/spark-oss/python/pyspark/sql/tests/test_dataframe.py", line 1291, in test_create_dataframe_from_pandas_with_day_time_interval
          self.assertEqual(df.toPandas().a.iloc[0], timedelta(microseconds=123))
        File "/Users/s.singh/personal/spark-oss/python/pyspark/sql/connect/dataframe.py", line 1031, in toPandas
          return self._session.client.to_pandas(query)
        File "/Users/s.singh/personal/spark-oss/python/pyspark/sql/connect/client.py", line 413, in to_pandas
          return self._execute_and_fetch(req)
        File "/Users/s.singh/personal/spark-oss/python/pyspark/sql/connect/client.py", line 573, in _execute_and_fetch
          self._handle_error(rpc_error)
        File "/Users/s.singh/personal/spark-oss/python/pyspark/sql/connect/client.py", line 623, in _handle_error
          raise SparkConnectException(status.message, info.reason) from None
      pyspark.sql.connect.client.SparkConnectException: (org.apache.spark.SparkUnsupportedOperationException) Unsupported data type: Duration(NANOSECOND)

      Attachments

        Activity

          People

            ueshin Takuya Ueshin
            techaddict Sandeep Singh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: