Skip to content

[SPARK-15594][SQL] ALTER TABLE SERDEPROPERTIES does not respect partition spec#13343

Closed
andrewor14 wants to merge 3 commits intoapache:masterfrom
andrewor14:alter-table-serdeproperties
Closed

[SPARK-15594][SQL] ALTER TABLE SERDEPROPERTIES does not respect partition spec#13343
andrewor14 wants to merge 3 commits intoapache:masterfrom
andrewor14:alter-table-serdeproperties

Conversation

@andrewor14
Copy link
Contributor

What changes were proposed in this pull request?

These commands ignore the partition spec and change the storage properties of the table itself:

ALTER TABLE table_name PARTITION (a=1, b=2) SET SERDE 'my_serde'
ALTER TABLE table_name PARTITION (a=1, b=2) SET SERDEPROPERTIES ('key1'='val1')

Now they change the storage properties of the specified partition.

How was this patch tested?

DDLSuite

@SparkQA
Copy link

SparkQA commented May 27, 2016

Test build #59440 has finished for PR 13343 at commit 7a3d403.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

}
// set serde properties only
sql("ALTER TABLE dbx.tab1 PARTITION (a=1, b=2) " +
"SET SERDEPROPERTIES ('k' = 'vvv', 'kay' = 'vee')")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do data source tables allow this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now they do. Should they not?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For data source tables, seems we do not store any partition specs. I am wondering why metastore does not complain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see. We can add 1 more check

@SparkQA
Copy link

SparkQA commented May 27, 2016

Test build #59522 has finished for PR 13343 at commit a6ece7f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@yhuai
Copy link
Contributor

yhuai commented May 28, 2016

lgtm. Merging to master and branch 2.0.

asfgit pushed a commit that referenced this pull request May 28, 2016
…tion spec

## What changes were proposed in this pull request?

These commands ignore the partition spec and change the storage properties of the table itself:
```
ALTER TABLE table_name PARTITION (a=1, b=2) SET SERDE 'my_serde'
ALTER TABLE table_name PARTITION (a=1, b=2) SET SERDEPROPERTIES ('key1'='val1')
```
Now they change the storage properties of the specified partition.

## How was this patch tested?

DDLSuite

Author: Andrew Or <andrew@databricks.com>

Closes #13343 from andrewor14/alter-table-serdeproperties.

(cherry picked from commit 4a2fb8b)
Signed-off-by: Yin Huai <yhuai@databricks.com>
@asfgit asfgit closed this in 4a2fb8b May 28, 2016
@andrewor14 andrewor14 deleted the alter-table-serdeproperties branch May 31, 2016 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants