trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: [TRAFODION-1423] Indexes on traf...
Date Mon, 03 Aug 2015 16:29:25 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/37#discussion_r36102842
  
    --- Diff: core/sql/generator/GenRelScan.cpp ---
    @@ -2203,10 +2203,46 @@ short HbaseAccess::codeGen(Generator * generator)
     		       ExpTupleDesc::SQLMX_KEY_FORMAT);
     
       const ValueIdList &retColumnList = retColRefSet_; 
    +  // Always get the index name -- it will be the base tablename for
    +  // primary access if it is trafodion table.
    +  char * tablename = NULL;
    +  char * snapshotName = NULL;
    +  LatestSnpSupportEnum  latestSnpSupport=  latest_snp_supported;
    +  if ((getTableDesc()->getNATable()->isHbaseRowTable()) ||
    +      (getTableDesc()->getNATable()->isHbaseCellTable()))
    +    {
    +      tablename =
    +        space->AllocateAndCopyToAlignedSpace(
    +                                             GenGetQualifiedName(getTableName().getQualifiedNameObj().getObjectName()),
0);
    +      latestSnpSupport = latest_snp_not_trafodion_table;
    +    }
    +  else
    +    {
    +      if (getIndexDesc() && getIndexDesc()->getNAFileSet())
    +      {
    +         tablename = space->AllocateAndCopyToAlignedSpace(GenGetQualifiedName(getIndexDesc()->getNAFileSet()->getFileSetName()),
0);
    +         if (getIndexDesc()->isClusteringIndex())
    +         {
    +            //base table
    +            snapshotName = (char*)getTableDesc()->getNATable()->getSnapshotName()
;
    +           if (snapshotName == NULL)
    +             latestSnpSupport = latest_snp_no_snapshot_available;
    +          }
    +          else
    +            latestSnpSupport = latest_snp_index_table;
    --- End diff --
    
    This part of the code is moved here from few lines below in the same function just to
get the tablename. The snapshot functionality is not affected by this change. Yes. We need
to figure out  the consequences if the snapshot for the index is not created, when table has
snapshot and vice versa. But, it is outside the scope of this change


---
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