Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIVE-27073: Apply SerDe properties when creating materialized view #4059

Merged

Conversation

kasakrisz
Copy link
Contributor

What changes were proposed in this pull request?

Set serde parameters when converting CreateMaterializedViewDesc to Table

Why are the changes needed?

Some serde parameters are affects the behavior of storage handler specified at create materialized view statements.

Does this PR introduce any user-facing change?

No. But the file format specified in cmv statements are show by describe formatted output.

How was this patch tested?

mvn test -Dtest.output.overwrite -Dtest=TestIcebergCliDriver -Dqfile=mv_iceberg_partitioned_orc.q,mv_iceberg_partitioned_orc2.q -pl itests/qtest-iceberg -Piceberg -Pitests

@sonarcloud
Copy link

sonarcloud bot commented Feb 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@kasakrisz kasakrisz changed the title Hive 27073 master mv iceberg fileformat HIVE-27073: Apply SerDe properties when creating materialized view Feb 14, 2023
@scarlin-cloudera
Copy link
Contributor

LGTM

Copy link
Contributor

@veghlaci05 veghlaci05 left a comment

Choose a reason for hiding this comment

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

LGTM, Approved.

@@ -349,6 +349,12 @@ public Table toTable(HiveConf conf) throws HiveException {
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_STORAGE,
getStorageHandler());
}
if (getSerdeProps() != null) {
for (Map.Entry<String, String> entry : getSerdeProps().entrySet()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You could use java stream API instead.

@kasakrisz kasakrisz merged commit 6f480cd into apache:master Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants