Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-36000 Support creation and operations of ps.Series/Index with Decimal('NaN')
  3. SPARK-36232

Support creating a ps.Series/Index with `Decimal('NaN')` with Arrow disabled

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.3.0
    • PySpark
    • None

    Description

       

      >>> import decimal as d
      >>> import pyspark.pandas as ps
      >>> import numpy as np
      >>> ps.utils.default_session().conf.set('spark.sql.execution.arrow.pyspark.enabled', True)
      >>> ps.Series([d.Decimal(1.0), d.Decimal(2.0), d.Decimal(np.nan)])
      0       1
      1       2
      2    None
      dtype: object
      >>> ps.utils.default_session().conf.set('spark.sql.execution.arrow.pyspark.enabled', False)
      >>> ps.Series([d.Decimal(1.0), d.Decimal(2.0), d.Decimal(np.nan)])
      21/07/02 15:01:07 ERROR Executor: Exception in task 6.0 in stage 13.0 (TID 51)
      net.razorvine.pickle.PickleException: problem construction object: java.lang.reflect.InvocationTargetException
      ...
      
      

      As the code is shown above, we cannot create a Series with `Decimal('NaN')` when Arrow disabled. We ought to fix that.

       

      Attachments

        Activity

          People

            yikunkero Yikun Jiang
            XinrongM Xinrong Meng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: