#include <hash_join_chunk.h>
◆ HashJoinChunk() [1/3]
HashJoinChunk::HashJoinChunk |
( |
| ) |
|
|
default |
◆ HashJoinChunk() [2/3]
◆ HashJoinChunk() [3/3]
◆ ~HashJoinChunk()
HashJoinChunk::~HashJoinChunk |
( |
| ) |
|
◆ ContinueRead()
bool HashJoinChunk::ContinueRead |
( |
| ) |
|
Switch from writing to reading, saving current write position in m_last_write_pos.
Continue reading from m_last_read_pos.
- Return values
-
◆ Init()
Initialize this HashJoinChunk.
- Parameters
-
tables | The tables to store row data from. Which column we store in the chunk file is determined by each tables read set. |
uses_match_flags | Whether each row should be prefixed with a match flag, saying whether the row had a matching row. |
- Returns
- true if the initialization failed.
◆ LoadRowFromChunk()
bool HashJoinChunk::LoadRowFromChunk |
( |
String * |
buffer, |
|
|
bool * |
matched, |
|
|
size_t * |
file_set_no = nullptr |
|
) |
| |
Read a row from the HashJoinChunk and put it in the record buffer.
The function will read a row from file on disk and put it in the record buffers (table->record[0]) in the provided tables. The file on disk should already be pointing to the start of a row.
- Parameters
-
| buffer | a buffer that is used when copying data from the chunk file to the tables. Note that any existing data in "buffer" is overwritten. |
[out] | matched | whether this row has seen a matching row from the other input. The flag is only restored if 'm_uses_match_flags' is set, and if the row comes from the probe input. |
| file_set_no | Used by set operations only: the zero based chunk file set number. If not nullptr, set this to current set file number. Note: If WriteRowToChunk used a non ignorable file_set_no, it is expected that a non nullptr value be provided here for reading of rows to proceed correctly. |
- Return values
-
◆ NumRows()
ha_rows HashJoinChunk::NumRows |
( |
| ) |
const |
|
inline |
- Returns
- the number of rows in this chunk
◆ operator=()
◆ Rewind()
bool HashJoinChunk::Rewind |
( |
| ) |
|
Flush the file buffer, and prepare the file for reading.
- Return values
-
◆ SetAppend()
bool HashJoinChunk::SetAppend |
( |
| ) |
|
Switch from reading to writing, saving current read position m_last_read_pos.
Continue writing from m_last_write_pos.
- Return values
-
◆ SetNumRows()
void HashJoinChunk::SetNumRows |
( |
ha_rows |
no | ) |
|
|
inline |
Set the number of rows we currently care about in this chunk.
Used to keep track of number of rows written from a certain point in time (the counter is incremented by writing).
- Parameters
-
no | the number to set the counter to |
◆ WriteRowToChunk()
bool HashJoinChunk::WriteRowToChunk |
( |
String * |
buffer, |
|
|
bool |
matched, |
|
|
size_t |
file_set_no = std::numeric_limits<size_t>::max() |
|
) |
| |
Write a row to the HashJoinChunk.
Read the row that lies in the record buffer (record[0]) of the given tables and write it out to the underlying file. If the QEP_TAB signals that the row ID should be kept, it is also written out. Note that TABLE::read_set is used to signal which columns that should be written to the chunk.
- Parameters
-
buffer | a buffer that is used when copying data from the tables to the chunk file. Note that any existing data in "buffer" is overwritten. |
matched | whether this row has seen a matching row from the other input. The flag is only written if 'm_uses_match_flags' is set, and if the row comes from the probe input. |
file_set_no | Used by set operations only: the zero based chunk file set number. If equal to std::numeric_limits<size_t>::max(), ignore ( default value). |
- Return values
-
◆ m_file
◆ m_last_read_pos
size_t HashJoinChunk::m_last_read_pos {0} |
|
private |
◆ m_last_write_pos
size_t HashJoinChunk::m_last_write_pos {0} |
|
private |
◆ m_num_rows
ha_rows HashJoinChunk::m_num_rows {0} |
|
private |
◆ m_tables
◆ m_uses_match_flags
bool HashJoinChunk::m_uses_match_flags {false} |
|
private |
The documentation for this class was generated from the following files: