trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nonstop-qfchen <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: run-time display methods for Atp...
Date Tue, 16 Feb 2016 18:07:25 GMT
Github user nonstop-qfchen commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/323#discussion_r53051488
  
    --- Diff: core/sql/exp/ExpCriDesc.cpp ---
    @@ -78,3 +79,20 @@ NA_EIDPROC Lng32 ex_cri_desc::unpack(void * base, void * reallocator)
         }
       return NAVersionedObject::unpack(base, reallocator);
     }
    +
    +NA_EIDPROC void ex_cri_desc::display(const char* title)
    +{
    +   cout << title << endl;
    +
    +   unsigned short tuples = noTuples();
    +   char buf[100];
    +   for (Int32 i=0; i<tuples; i++) {
    +      ExpTupleDesc* tDesc = getTupleDescriptor(i);
    +      if ( tDesc ) {
    +         sprintf(buf, "%dth tuple:", i);
    +         tDesc->display(buf);
    +      } else
    +         cout << i << "th tuple's TupleDesc is NULL" << endl;
    --- End diff --
    
    Will do with next check-in in this area.  Also need to cover more primitive
    data types.
    
    On Tue, Feb 16, 2016 at 11:22 AM, Hans Zeller <notifications@github.com>
    wrote:
    
    > In core/sql/exp/ExpCriDesc.cpp
    > <https://github.com/apache/incubator-trafodion/pull/323#discussion_r53044604>
    > :
    >
    > > @@ -78,3 +79,20 @@ NA_EIDPROC Lng32 ex_cri_desc::unpack(void * base, void *
reallocator)
    > >      }
    > >    return NAVersionedObject::unpack(base, reallocator);
    > >  }
    > > +
    > > +NA_EIDPROC void ex_cri_desc::display(const char* title)
    > > +{
    > > +   cout << title << endl;
    > > +
    > > +   unsigned short tuples = noTuples();
    > > +   char buf[100];
    > > +   for (Int32 i=0; i<tuples; i++) {
    > > +      ExpTupleDesc* tDesc = getTupleDescriptor(i);
    > > +      if ( tDesc ) {
    > > +         sprintf(buf, "%dth tuple:", i);
    > > +         tDesc->display(buf);
    > > +      } else
    > > +         cout << i << "th tuple's TupleDesc is NULL" << endl;
    >
    > In this case it could display a hex dump of the tupp
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/incubator-trafodion/pull/323/files#r53044604>.
    >
    
    
    
    -- 
    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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message