trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #644: Trafodion 1788
Date Mon, 08 Aug 2016 20:58:31 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/644#discussion_r73953193
  
    --- Diff: core/sql/sqlcomp/PrivMgrMD.cpp ---
    @@ -630,6 +630,138 @@ bool PrivMgrMDAdmin::isAuthorized (void)
     }
     
     // ****************************************************************************
    +// method:  getColumnReferences
    +//
    +//  This method stores the list of columns for the object in the 
    +//  ObjectReference. 
    +// **************************************************************************** 
    +PrivStatus PrivMgrMDAdmin::getColumnReferences (ObjectReference *objectRef)
    +{
    +  std::string objectMDTable = trafMetadataLocation_ + ".OBJECTS o";
    +  std::string colMDTable = trafMetadataLocation_ + ".COLUMNS c";
    +
    +  // Select column details for object 
    +  std::string selectStmt = "select c.column_number from ";
    +  selectStmt += objectMDTable;
    +  selectStmt += ", ";
    +  selectStmt += colMDTable;
    +  selectStmt += " where o.object_uid = ";
    +  selectStmt += UIDToString(objectRef->objectUID);
    +  selectStmt += " and o.object_uid = c.object_uid";
    +  selectStmt += " order by column_number";
    --- End diff --
    
    Why is the join to the OBJECTS table needed? Looks like the only thing you are retrieving
is from the COLUMNS table and you have the key info you need for that?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message