This is an automated email from the ASF dual-hosted git repository.
wenchen pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new dbf17f1 [SPARK-30757][SQL][DOC] Update the doc on
TableCatalog.alterTable's behavior
dbf17f1 is described below
commit dbf17f194d625c6bb8d8fcba5f4913e84000ab6f
Author: Terry Kim <[email protected]>
AuthorDate: Mon Feb 10 19:04:49 2020 +0800
[SPARK-30757][SQL][DOC] Update the doc on TableCatalog.alterTable's behavior
### What changes were proposed in this pull request?
This PR updates the documentation on `TableCatalog.alterTable`s behavior on
the order by which the requested changes are applied. It now explicitly
mentions that the changes are applied in the order given.
### Why are the changes needed?
The current documentation on `TableCatalog.alterTable` doesn't mention
which order the requested changes are applied. It will be useful to explicitly
document this behavior so that the user can expect the behavior. For example,
`REPLACE COLUMNS` needs to delete columns before adding new columns, and if the
order is guaranteed by `alterTable`, it's much easier to work with the catalog
API.
### Does this PR introduce any user-facing change?
Yes, document change.
### How was this patch tested?
Not added (doc changes).
Closes #27496 from imback82/catalog_table_alter_table.
Authored-by: Terry Kim <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit 70e545a94d47afb2848c24e81c908d28d41016da)
Signed-off-by: Wenchen Fan <[email protected]>
---
.../main/java/org/apache/spark/sql/connector/catalog/TableCatalog.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableCatalog.java
b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableCatalog.java
index a69b23b..2f10234 100644
---
a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableCatalog.java
+++
b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableCatalog.java
@@ -134,6 +134,8 @@ public interface TableCatalog extends CatalogPlugin {
* Implementations may reject the requested changes. If any change is
rejected, none of the
* changes should be applied to the table.
* <p>
+ * The requested changes must be applied in the order given.
+ * <p>
* If the catalog supports views and contains a view for the identifier and
not a table, this
* must throw {@link NoSuchTableException}.
*
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]