-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29116 : Create a DDL for setting hive default partition name at the table level #6013
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
base: master
Are you sure you want to change the base?
HIVE-29116 : Create a DDL for setting hive default partition name at the table level #6013
Conversation
@deniskuzZ , @chinnaraolalam could you please take a look at this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vikramahuja1001, I have the same concern about setting the default partition name, and I'm glad to see the patch addressing it. I have reviewed the changes, except for HiveAlterHandler.java
(I need more time to study the changes and the relevant context), and left comments on the places where I have questions. Could you please review my comments on the changes?
.../main/java/org/apache/hive/hcatalog/mapreduce/DynamicPartitionFileRecordWriterContainer.java
Outdated
Show resolved
Hide resolved
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
Outdated
Show resolved
Hide resolved
parser/src/java/org/apache/hadoop/hive/ql/parse/AlterClauseParser.g
Outdated
Show resolved
Hide resolved
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/PartitionUtils.java
Outdated
Show resolved
Hide resolved
...ache/hadoop/hive/ql/ddl/table/setdefaultpartition/AlterTableSetDefaultPartitionAnalyser.java
Outdated
Show resolved
Hide resolved
...tore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Outdated
Show resolved
Hide resolved
...e-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
Outdated
Show resolved
Hide resolved
...e-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
Outdated
Show resolved
Hide resolved
...store/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
Outdated
Show resolved
Hide resolved
.../main/java/org/apache/hive/hcatalog/mapreduce/DynamicPartitionFileRecordWriterContainer.java
Outdated
Show resolved
Hide resolved
|
||
set hive.msck.path.validation=skip; | ||
|
||
MSCK REPAIR TABLE tbl_y; | ||
|
||
SHOW PARTITIONS tbl_y; | ||
|
||
SET hive.exec.default.partition.name=SECOND_PARTITION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test to validate hive.exec.default.partition.name
is no more session configurable
Thanks for reviewing this PR @ngsg @Indhumathi27 |
0620594
to
c750cf5
Compare
@vikramahuja1001 , i think change is required in
|
Remove hardcoding from here as well + update comments as well accordingly
Line 310 in 90820ac
|
Remove hardcoding from following place: Line 715 in 733d4f0
hive/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/HCatFileUtil.java Line 71 in ba0217f
|
2. Restrict set hive.exec.default.partition at runtime 3. use table property to check the default partition along with hive.exec.default.partition at cluster level
c750cf5
to
38d2917
Compare
@Aggarwal-Raghav ,very good point, makes sense. Thanks for pointing this out. There are indeed a lot of places where HIVE_DEFAULT_PARTITION is hard coded. Have put a few commits to fix that. |
|
For more details refer: https://issues.apache.org/jira/browse/HIVE-29116
What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?