dengzhhu653 commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r982004642
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeOperation.java:
##########
@@ -157,27 +158,12 @@ private void setTableParameters(Table tbl) throws
HiveException {
}
// We should copy only those table parameters that are specified in the
config.
SerDeSpec spec = AnnotationUtils.getAnnotation(serdeClass,
SerDeSpec.class);
-
- // for non-native table, property storage_handler should be retained
- retainer.add(META_TABLE_STORAGE);
- if (spec != null && spec.schemaProps() != null) {
- retainer.addAll(Arrays.asList(spec.schemaProps()));
- }
-
- String paramsStr = HiveConf.getVar(context.getConf(),
HiveConf.ConfVars.DDL_CTL_PARAMETERS_WHITELIST);
- if (paramsStr != null) {
- retainer.addAll(Arrays.asList(paramsStr.split(",")));
- }
-
- Map<String, String> params = tbl.getParameters();
- if (!retainer.isEmpty()) {
- params.keySet().retainAll(retainer);
- } else {
- params.clear();
- }
+ //With Hive-25813, we'll not copy over table properties from the source.
+ //CTLT should should copy column schema but not table properties. It is
also consistent with other query engines like mysql, redshift.
+ tbl.getParameters().clear();
Review Comment:
I'm wondering this would introduce incompatibility, such as discovery
partitions, compression etc.
There is also a property `hive.ddl.createtablelike.properties.whitelist`,
which select the table Properties to copy over in this case.
--
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]