dengzhhu653 commented on code in PR #5458:
URL: https://github.com/apache/hive/pull/5458#discussion_r1774994242
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeOperation.java:
##########
@@ -155,6 +158,15 @@ private void setTableParameters(Table tbl, Map<String,
String> originalPropertie
if (desc.getTblProps() != null) {
tbl.setParameters(desc.getTblProps());
}
+ String paramsStr = HiveConf.getVar(context.getConf(),
HiveConf.ConfVars.DDL_CTL_PARAMETERS_WHITELIST);
Review Comment:
nit: can we move this changes above
```
if (desc.getTblProps() != null) {
tbl.setParameters(desc.getTblProps());
}
```
and change it to:
```
String paramsStr = HiveConf.getVar(context.getConf(),
HiveConf.ConfVars.DDL_CTL_PARAMETERS_WHITELIST);
if (paramsStr != null) {
Set<String> retainer = new
HashSet<String>(Arrays.asList(paramsStr.split(",")));
originalProperties.entrySet().stream().filter(entry ->
retainer.contains(entry.getKey()))
.forEach(entry -> tbl.getParameters().put(entry.getKey(),
entry.getValue()));
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]