Github user DaveBirdsall commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafodion/pull/1288#discussion_r150693531
  
    --- Diff: core/sql/sqlcomp/CmpDescribe.cpp ---
    @@ -4634,12 +4816,49 @@ short CmpDescribeRoutine (const CorrName   & cn,
     
       outputShortLine (*space, "  ;");
     
    +  CmpSeabaseDDL cmpSBD((NAHeap*)heap);
    +
       char * sqlmxRegr = getenv("SQLMX_REGRESS");
       NABoolean displayPrivilegeGrants = TRUE;
       if (((CmpCommon::getDefault(SHOWDDL_DISPLAY_PRIVILEGE_GRANTS) == 
DF_SYSTEM) && sqlmxRegr) ||
            (CmpCommon::getDefault(SHOWDDL_DISPLAY_PRIVILEGE_GRANTS) == DF_OFF))
         displayPrivilegeGrants = FALSE;
     
    +  //display comment of routine
    +  Int64 routineUID = routine->getRoutineID();
    +  if ( routineUID > 0)
    +    {
    +      if (cmpSBD.switchCompiler())
    +      {
    +         *CmpCommon::diags() << DgSqlCode(-CAT_UNABLE_TO_RETRIEVE_PRIVS);
    +         return -1;
    +      }
    +
    +      ComTdbVirtObjCommentInfo objCommentInfo;
    +      if (cmpSBD.getSeabaseObjectComment(routineUID, 
COM_USER_DEFINED_ROUTINE_OBJECT, objCommentInfo, heap))
    +        {
    +          *CmpCommon::diags() << 
DgSqlCode(-CAT_UNABLE_TO_RETRIEVE_COMMENTS);
    +          return -1;
    --- End diff --
    
    Switch back compiler here?


---

Reply via email to