saihemanth-cloudera commented on a change in pull request #1960:
URL: https://github.com/apache/hive/pull/1960#discussion_r605869332



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -13707,14 +13709,25 @@ ASTNode analyzeCreateTable(
 
   /** Adds entities for create table/create view. */
   private void addDbAndTabToOutputs(String[] qualifiedTabName, TableType type,
-      boolean isTemporary, Map<String, String> tblProps) throws 
SemanticException {
+      boolean isTemporary, Map<String, String> tblProps, StorageFormat 
storageFormat) throws SemanticException {
     Database database  = getDatabase(qualifiedTabName[0]);
     outputs.add(new WriteEntity(database, WriteEntity.WriteType.DDL_SHARED));
 
     Table t = new Table(qualifiedTabName[0], qualifiedTabName[1]);
     t.setParameters(tblProps);
     t.setTableType(type);
     t.setTemporary(isTemporary);
+    HiveStorageHandler storageHandler = null;
+    try {
+      storageHandler = (HiveStorageHandler) ReflectionUtils.newInstance(
+              conf.getClassByName(storageFormat.getStorageHandler()), 
SessionState.get().getConf());
+    }catch(ClassNotFoundException ex){
+      System.out.println("Class not found. Storage handler will be set to 
null: "+ex);
+    }
+    t.setStorageHandler(storageHandler);
+    for(Map.Entry<String,String> serdeMap : 
storageFormat.getSerdeProps().entrySet()){

Review comment:
       Currently, in the compilation phase we are not sending serde information 
for ranger auth. This storageFormat's serde has table mappings(eg: hbase table 
name, column family) of external that needs to be set to table serde.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to