[ 
https://issues.apache.org/jira/browse/TRAFODION-1423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15008997#comment-15008997
 ] 

ASF GitHub Bot commented on TRAFODION-1423:
-------------------------------------------

Github user sureshsubbiah commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/178#discussion_r45085128
  
    --- Diff: core/sql/generator/GenRelScan.cpp ---
    @@ -302,7 +302,7 @@ int HbaseAccess::createAsciiColAndCastExpr2(Generator * 
generator,
       asciiValue = new (h) NATypeToItem(newGivenType->newCopy(h));
       castValue = new(h) Cast(asciiValue, newGivenType); 
     
    -  if (HbaseAccess::isEncodingNeededForSerialization(colNode))
    +  if ((!alignedFormat) && 
HbaseAccess::isEncodingNeededForSerialization(colNode))
    --- End diff --
    
    This comment is about line 264, the NABoolean 
HbaseAccess::isEncodingNeededForSerialization(ItemExpr * colNode) method. I 
could not add a comment  there.
    
    Is this method expected to return the correct answer now if it is called on 
an Index object which is aligned, but whose parent table is not aligned? I 
would expect the answer to be  YES, and therefore the additional change in line 
305 is not necessary. If that is not the case, then some kind of comment on 
line 296 starting that it cannot be used directly on aligned indexes will be 
good.


> Indexes on trafodion should be created in aligned row format by default
> -----------------------------------------------------------------------
>
>                 Key: TRAFODION-1423
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1423
>             Project: Apache Trafodion
>          Issue Type: Improvement
>          Components: sql-cmp, sql-cmu
>    Affects Versions: 2.0-incubating
>            Reporter: Selvaganesan Govindarajan
>            Assignee: Selvaganesan Govindarajan
>
> Currently indexes are created with the same row format as the table. However, 
> indexes can be created in aligned row format independent of the table because 
> the columns in the index table doesn't have any other column other than salt, 
> index columns, and primary key of the table. These column values constitute 
> the rowid. Index rows are always deleted and inserted and are never updated. 
> Hence, it goes well to create index in aligned row format. In addition, index 
> in aligned row format has the following advantages:
> - Reduced storage space for the index
> - Reduced block cache and memstore space at runtime



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to