Github user SuJinpei commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1425#discussion_r166265982
--- Diff: core/conn/odb/src/odb.c ---
@@ -10867,7 +10874,7 @@ static int Ocopy(int eid)
}
/* Build Extract Command */
- if ( etab[eid].ps ) {
+ if ( etab[eid].ps > 1 ) {
--- End diff --
Hi Suresh, if ps > 1, odb will split select job to number of ps thread,
for example, if we have [1, 12] range of data and ps == 3, the data will first
be divided to 3 group: [1, 4), [4, 7), [7, 10), then change last group to [7,
12), the coding deal with last group in line 5830, but there make assumption
ps > 1. So for this bug, data range is [6, 10], will be split to [6, 10),
because of ps == 1, this group has no chance to be changed. so data == 10 lost.
I found many expression "if (etab[no].ps) " make an assumption that ps > 1 and
below line(5835) contains a potential bug. so I will make another commit to fix
this. thank you for making me aware of these issues.
etab[no].sbmax = ( j + 1 ) == etab[l].ps ? (sbmax + 1 ) : etab[no].sbmin +
d ;
---