[
https://issues.apache.org/jira/browse/SPARK-19129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wenchen Fan resolved SPARK-19129.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.2.0
2.1.1
Issue resolved by pull request 16583
[https://github.com/apache/spark/pull/16583]
> alter table table_name drop partition with a empty string will drop the whole
> table
> -----------------------------------------------------------------------------------
>
> Key: SPARK-19129
> URL: https://issues.apache.org/jira/browse/SPARK-19129
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.1.0
> Reporter: lichenglin
> Assignee: Xiao Li
> Priority: Critical
> Labels: correctness
> Fix For: 2.1.1, 2.2.0
>
>
> {code}
> val spark = SparkSession
> .builder
> .appName("PartitionDropTest")
> .master("local[2]").enableHiveSupport()
> .getOrCreate()
> val sentenceData = spark.createDataFrame(Seq(
> (0, "a"),
> (1, "b"),
> (2, "c")))
> .toDF("id", "name")
> spark.sql("drop table if exists licllocal.partition_table")
>
> sentenceData.write.mode(SaveMode.Overwrite).partitionBy("id").saveAsTable("licllocal.partition_table")
> spark.sql("alter table licllocal.partition_table drop partition(id='')")
> spark.table("licllocal.partition_table").show()
> {code}
> the result is
> {code}
> |name| id|
> +----+---+
> +----+---+
> {code}
> Maybe the partition match have something wrong when the partition value is
> set to empty string
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]