You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by GitBox <gi...@apache.org> on 2019/05/08 19:32:09 UTC

[GitHub] [trafodion] anoopsharma00 commented on a change in pull request #1597: Trafodion 3084 support to create comment on hbase table

anoopsharma00 commented on a change in pull request #1597: Trafodion 3084  support to create comment on hbase table 
URL: https://github.com/apache/trafodion/pull/1597#discussion_r282215518
 
 

 ##########
 File path: core/sql/sqlcomp/CmpSeabaseDDLcommentOn.cpp
 ##########
 @@ -289,6 +289,31 @@ void  CmpSeabaseDDL::doSeabaseCommentOn(StmtDDLCommentOn   *commentOnNode,
 
   ExeCliInterface cliInterface(STMTHEAP, NULL, NULL,
                                        CmpCommon::context()->sqlSession()->getParentQid());
+  //if comment on native HBASE first shoud register first
+  if (CmpSeabaseDDL::isHbase(catalogNamePart))
+  {
+      // HBase."MAP" fromater should covert
+      if (ComIsHBaseMappedExtFormat(catalogNamePart, schemaNamePart))
+      {
+           ComConvertHBaseMappedExtToInt(catalogNamePart, schemaNamePart, catalogNamePart, schemaNamePart);
+      }
+      else
+      {
+          //HBASE erternal table already register in create time no need to register again
+          NAString ddl = "REGISTER INTERNAL HBASE TABLE IF NOT REGISTERED ";
+          ddl.append(extObjName.data());
+
+          Lng32 cliRC = cliInterface.executeImmediate(ddl.data());
+          // error code -8102 means the object already register
+          if (cliRC < 0 && cliRC != -8102)
 
 Review comment:
   Since the ddl issued is 'register ...if not registered', an 8102 error will
   not be returned if object already exists.
   This check should not be done and all errors should be returned.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services