Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-29875

Avoid to use deprecated pyarrow.open_stream API in Spark 2.4.x

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.4.4
    • 2.4.5
    • PySpark, SQL
    • None

    Description

      In Spark 2.4.x, if we use PyArrow higher then 0.12.0, it shows a bunch of warnings as below:

      from pyspark.sql.functions import pandas_udf, PandasUDFType
      
      @pandas_udf("integer", PandasUDFType.SCALAR)  # doctest: +SKIP
      def add_one(x):
          return x + 1
      
      spark.range(100).select(add_one("id")).collect()
      
      UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      /usr/local/lib/python3.7/site-packages/pyarrow/__init__.py:157: UserWarning: pyarrow.open_stream is deprecated, please use pyarrow.ipc.open_stream
        warnings.warn("pyarrow.open_stream is deprecated, please use "
      

      Attachments

        Issue Links

          Activity

            People

              gurwls223 Hyukjin Kwon
              gurwls223 Hyukjin Kwon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: