HyukjinKwon commented on pull request #34021:
URL: https://github.com/apache/spark/pull/34021#issuecomment-921344172


   looks like we should fix the test:
   
   ```
   **********************************************************************
   File "/__w/spark/spark/python/pyspark/sql/dataframe.py", line 2553, in 
pyspark.sql.dataframe.DataFrame.withMetadata
   Failed example:
       df_meta = df.withMetadata('age', {'foo': 'bar'})
   Exception raised:
       Traceback (most recent call last):
         File "/usr/lib/pypy3/lib-python/3/doctest.py", line 1339, in __run
           compileflags, 1), test.globs)
         File "<doctest pyspark.sql.dataframe.DataFrame.withMetadata[0]>", line 
1, in <module>
           df_meta = df.withMetadata('age', {'foo': 'bar'})
         File "/__w/spark/spark/python/pyspark/sql/dataframe.py", line 2559, in 
withMetadata
           sc = SparkContext._active_spark_context
       NameError: name 'SparkContext' is not defined
   **********************************************************************
   File "/__w/spark/spark/python/pyspark/sql/dataframe.py", line 2554, in 
pyspark.sql.dataframe.DataFrame.withMetadata
   Failed example:
       df_meta.schema['age'].metadata
   Exception raised:
       Traceback (most recent call last):
         File "/usr/lib/pypy3/lib-python/3/doctest.py", line 1339, in __run
           compileflags, 1), test.globs)
         File "<doctest pyspark.sql.dataframe.DataFrame.withMetadata[1]>", line 
1, in <module>
           df_meta.schema['age'].metadata
       NameError: name 'df_meta' is not defined
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to