You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/10/20 23:09:28 UTC

[GitHub] [hive] saihemanth-cloudera commented on a diff in pull request #3627: HIVE-25813: Create Table x Like commands based storage handlers fail over is fixed

saihemanth-cloudera commented on code in PR #3627:
URL: https://github.com/apache/hive/pull/3627#discussion_r1001204480


##########
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 tried that but if do sp we will end up not copying createtabledesc's table properties.



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org