Github user nonstop-qfchen commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/152#discussion_r43414673
  
    --- Diff: core/sql/optimizer/NAColumn.cpp ---
    @@ -838,3 +838,27 @@ Int32 NAColumnArray::getColumnPosition(NAColumn& nc) 
const
       return -1;
     }
     
    +NAString NAColumnArray::getColumnNamesAsString(char separator) const
    +{
    +   return getColumnNamesAsString(separator, entries());
    +}
    +
    +NAString NAColumnArray::getColumnNamesAsString(char separator, UInt32 ct) 
const
    +{
    +  NAString nmList;
    +
    +  if ( ct == 0 )
    +    return NAString();
    +
    +  if ( ct > entries() )
    +    ct = entries();
    +
    +  for (CollIndex i = 0; i < ct-1; i++)
    +  {
    +     nmList += at(i)->getColName();
    --- End diff --
    
    The rework has been submitted.
    
    On Thu, Oct 29, 2015 at 11:36 AM, Qifan Chen <[email protected]> wrote:
    
    > Good point. Will wrap getColName() with ToAnsiIdentifier().
    >
    > See
    >
    > const NAType *Assign::synthesizeType()
    > {
    >   ValueId targetId, sourceId;
    >   const NAType * result = doSynthesizeType(targetId, sourceId);
    >   if (result == NULL)
    >   {
    >     emitDyadicTypeSQLnameMsg(-4039,
    >                              targetId.getType(),
    >                              sourceId.getType(),
    >
    >  ToAnsiIdentifier(targetId.getNAColumn()->getColName()));
    >     return NULL;
    >   }
    >   //
    >   // Return the result.
    >   //
    >   return result;
    > }
    >
    >
    > On Thu, Oct 29, 2015 at 10:50 AM, DaveBirdsall <[email protected]>
    > wrote:
    >
    >> In core/sql/optimizer/NAColumn.cpp
    >> 
<https://github.com/apache/incubator-trafodion/pull/152#discussion_r43403344>
    >> :
    >>
    >> > +   return getColumnNamesAsString(separator, entries());
    >> > +}
    >> > +
    >> > +NAString NAColumnArray::getColumnNamesAsString(char separator, UInt32 
ct) const
    >> > +{
    >> > +  NAString nmList;
    >> > +
    >> > +  if ( ct == 0 )
    >> > +    return NAString();
    >> > +
    >> > +  if ( ct > entries() )
    >> > +    ct = entries();
    >> > +
    >> > +  for (CollIndex i = 0; i < ct-1; i++)
    >> > +  {
    >> > +     nmList += at(i)->getColName();
    >>
    >> Are there any oddities to consider when using delimited identifiers?
    >>
    >> —
    >> Reply to this email directly or view it on GitHub
    >> <https://github.com/apache/incubator-trafodion/pull/152/files#r43403344>.
    >>
    >
    >
    >
    > --
    > Regards, --Qifan
    >
    >
    
    
    -- 
    Regards, --Qifan



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to