You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "David Lindelöf (Jira)" <ji...@apache.org> on 2019/12/19 14:45:00 UTC
[jira] [Created] (SPARK-30305) Unable to overwrite table created by
another Spark session
David Lindelöf created SPARK-30305:
--------------------------------------
Summary: Unable to overwrite table created by another Spark session
Key: SPARK-30305
URL: https://issues.apache.org/jira/browse/SPARK-30305
Project: Spark
Issue Type: Bug
Components: PySpark
Affects Versions: 2.4.4
Reporter: David Lindelöf
I'm unable to save a dataframe to a table, even when passing the `mode='overwrite'` argument:
{code:java}
def test_pyspark_can_overwrite_table():
spark = SparkSession.builder.getOrCreate()
sdf = spark.createDataFrame([('Alice', 1)])
sdf.write.saveAsTable('alice')
spark.stop()
spark = SparkSession.builder.getOrCreate()
sdf = spark.createDataFrame([('Alice', 1)])
sdf.write.saveAsTable('alice', mode='overwrite')
{code}
I would expect this to succeed. Instead, I get the output in the attached file.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org