trafodion-codereview mailing list archives

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

    https://github.com/apache/incubator-trafodion/pull/37#discussion_r36128049
  
    --- 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 --
    
    It's outside of this change, but I'm curious: How in general do we guarantee consistency
of a table snapshot with index snapshots?


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