#include <ExecStreamGenerator.h>
Inheritance diagram for MixedDupColumnGenerator:

Public Member Functions | |
| MixedDupColumnGenerator (int numDupsInit, int startValue=0, int wid=1) | |
| int64_t | next () | 
Private Attributes | |
| int | numDups | 
| int64_t | curValue | 
| int | width | 
| int | nextValue | 
| int | initialValue | 
Generates a mixture of unique rows or duplicate rows of numDups per value for a column, in sequence, starting at initValue:
0, 1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 7, 8, ...
Definition at line 473 of file ExecStreamGenerator.h.
| MixedDupColumnGenerator::MixedDupColumnGenerator | ( | int | numDupsInit, | |
| int |  startValue = 0,  | 
        |||
| int |  wid = 1 | |||
| ) |  [inline, explicit] | 
        
Definition at line 482 of file ExecStreamGenerator.h.
References curValue, initialValue, nextValue, numDups, and width.
00486 { 00487 assert(numDupsInit > 0); 00488 numDups = numDupsInit; 00489 curValue = 0; 00490 width = wid; 00491 initialValue = nextValue = startValue; 00492 }
| int64_t MixedDupColumnGenerator::next | ( | ) |  [inline, virtual] | 
        
Implements ColumnGenerator< T >.
Definition at line 494 of file ExecStreamGenerator.h.
References curValue, initialValue, nextValue, numDups, and width.
00495 { 00496 int res; 00497 00498 if ((((nextValue - initialValue) / width) % 2)) { 00499 res = nextValue + curValue++ / numDups; 00500 if (curValue == numDups) { 00501 curValue = 0; 00502 nextValue++; 00503 } 00504 } else { 00505 res = nextValue++; 00506 } 00507 00508 return res; 00509 }
int MixedDupColumnGenerator::numDups [private]           | 
        
Definition at line 475 of file ExecStreamGenerator.h.
Referenced by MixedDupColumnGenerator(), and next().
int64_t MixedDupColumnGenerator::curValue [private]           | 
        
Definition at line 476 of file ExecStreamGenerator.h.
Referenced by MixedDupColumnGenerator(), and next().
int MixedDupColumnGenerator::width [private]           | 
        
Definition at line 477 of file ExecStreamGenerator.h.
Referenced by MixedDupColumnGenerator(), and next().
int MixedDupColumnGenerator::nextValue [private]           | 
        
Definition at line 478 of file ExecStreamGenerator.h.
Referenced by MixedDupColumnGenerator(), and next().
int MixedDupColumnGenerator::initialValue [private]           | 
        
Definition at line 479 of file ExecStreamGenerator.h.
Referenced by MixedDupColumnGenerator(), and next().
 1.5.1