[
https://issues.apache.org/jira/browse/HIVE-29066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17993151#comment-17993151
]
Raghav Aggarwal commented on HIVE-29066:
----------------------------------------
Based on the initial debugging:
PARTITION_NAME_WHITELIST_PATTERN is part of metaConfVars i.e part of config
list that can be updated in a beeline session using
{code:java}
set metaconf:metastore.partition.name.whitelist.pattern=value;{code}
_HMSHandler.partitionValidationPattern_ field is initialized in init() method
and there is no way to update it, if user set the config in session level.
> PARTITION_NAME_WHITELIST_PATTERN is not honouring session level metaconf
> ------------------------------------------------------------------------
>
> Key: HIVE-29066
> URL: https://issues.apache.org/jira/browse/HIVE-29066
> Project: Hive
> Issue Type: Bug
> Reporter: Raghav Aggarwal
> Assignee: Raghav Aggarwal
> Priority: Major
>
> Steps to repro (ensure _metastore.partition.name.whitelist.pattern_ or
> _hive.metastore.partition.name.whitelist.pattern_ is not present in
> hive-site.xml):
> {code:java}
> set metaconf:metastore.partition.name.whitelist.pattern=[^9]*;
> create table t1 (id int) partitioned by (pcol string);
> alter table t1 add partition (pCol='2025-06-09');{code}
> *What is happening:* *Query is passing.*
>
> *The expect outcome should be*
> {code:java}
> Error: Error while compiling statement: FAILED: Execution Error, return code
> 40000 from org. apache.hadoop.hive.ql.ddl.DDLTask.
> MetaException(message:Partition value ' 2025-06-09' contains a character not
> matched by whitelist pattern '[^9]*'. (configure with
> metastore.partition.name.whitelist.pattern)); Query ID: raghav_20250703214
> 146_1fcab256-2425-4e9e-8ac0-ec2d53e2d1b0 (state=08S01, code=40000) {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)