trafodion-codereview mailing list archives

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

    https://github.com/apache/incubator-trafodion/pull/37#discussion_r36086954
  
    --- 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 --
    
    Do we support the case where the base table has no snapshot defined on it but an index
on the table does have a snapshot?


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