spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao Li (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-19129) alter table table_name drop partition with a empty string will drop the whole table
Date Fri, 13 Jan 2017 20:51:26 GMT

     [ https://issues.apache.org/jira/browse/SPARK-19129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xiao Li reassigned SPARK-19129:
-------------------------------

    Assignee: Xiao Li

> 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
>              Labels: correctness
>
> {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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message