| java.lang.Object com.quadcap.sql.TempTable com.quadcap.sql.TempTableMerge
TempTableMerge | public class TempTableMerge extends TempTable (Code) | | A special temp table used to implement UNION and INTERSECT
expressions.
The temp table that we build has keys based on the union columns,
and the data as 13 bytes:
byte 0: | if zero, the rowId refers to a real table row
if one, the rowId refers to a temp row |
bytes 1-8: | the rowId of the union row |
bytes 9-12: | the duplicate count (from table 1) |
bytes 13-16: | the duplicate count (from table 2) |
author: Stan Bailes |
Field Summary | |
final static int | BUFSIZE | final static int | fCOUNT The byte offset of the two 'count' integers. | final static int | fIS_TEMP Byte offset of 'isTemp' byte flag in a data row. | final static int | fROW_ID |
Method Summary | |
public void | addRows(Session session, Cursor cursor, int side, int[] map) Add rows from one side of the {union/merge} operation, building a
temporary index on the key. | final int | getCount(int side) | final static int | getCount(byte[] data, int side) | public byte[] | getData(byte[] key) |
BUFSIZE | final static int BUFSIZE(Code) | | Total size of the data buffer in our temp index
|
fCOUNT | final static int fCOUNT(Code) | | The byte offset of the two 'count' integers. in the data row
|
fIS_TEMP | final static int fIS_TEMP(Code) | | Byte offset of 'isTemp' byte flag in a data row.
|
fROW_ID | final static int fROW_ID(Code) | | The byte offset of the (long) row ID in data data row
|
addRows | public void addRows(Session session, Cursor cursor, int side, int[] map) throws SQLException, IOException(Code) | | Add rows from one side of the {union/merge} operation, building a
temporary index on the key.
|
getCount | final int getCount(int side)(Code) | | |
getCount | final static int getCount(byte[] data, int side)(Code) | | |
|
|