spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lichenglin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-19131) Support "alter table drop partition [if exists]"
Date Mon, 09 Jan 2017 05:53:58 GMT

    [ https://issues.apache.org/jira/browse/SPARK-19131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15810768#comment-15810768
] 

lichenglin commented on SPARK-19131:
------------------------------------

Yes

> Support "alter table drop partition [if exists]"
> ------------------------------------------------
>
>                 Key: SPARK-19131
>                 URL: https://issues.apache.org/jira/browse/SPARK-19131
>             Project: Spark
>          Issue Type: New Feature
>    Affects Versions: 2.1.0
>            Reporter: lichenglin
>
> {code}
> val parts = client.getPartitions(hiveTable, s.asJava).asScala
>         if (parts.isEmpty && !ignoreIfNotExists) {
>           throw new AnalysisException(
>             s"No partition is dropped. One partition spec '$s' does not exist in table
'$table' " +
>             s"database '$db'")
>         }
>         parts.map(_.getValues)
> {code}
> Until 2.1.0,drop partition will throw a exception when no partition to drop.
> I notice there is a param named ignoreIfNotExists.
> But I don't know how to set it.
> May be we can implement "alter table drop partition [if exists] " 



--
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