|
Apache GraphAr C++ Library
The C++ Library for Apache GraphAr
|
The arrow chunk reader for adj list topology chunk. More...
#include <chunk_reader.h>
Public Types | |
| using | range_t = std::pair< IdType, IdType > |
Public Member Functions | |
| AdjListArrowChunkReader (const std::shared_ptr< EdgeInfo > &edge_info, AdjListType adj_list_type, const std::string &prefix) | |
| Initialize the AdjListArrowChunkReader. More... | |
| AdjListArrowChunkReader (const AdjListArrowChunkReader &other) | |
| Copy constructor. | |
| Status | seek_src (IdType id) |
| Sets chunk position indicator for reader by source vertex id. More... | |
| Status | seek_dst (IdType offset) |
| Sets chunk position indicator for reader by destination vertex id. More... | |
| Status | seek (IdType offset) |
| Sets chunk position indicator for reader by edge index. More... | |
| Result< std::shared_ptr< arrow::Table > > | GetChunk () |
| Return the current chunk of chunk position indicator as arrow::Table, if the chunk is empty, return nullptr. | |
| Result< IdType > | GetRowNumOfChunk () |
| Get the number of rows of the current chunk table. | |
| Status | next_chunk () |
| Sets chunk position indicator to next chunk. More... | |
| Status | seek_chunk_index (IdType vertex_chunk_index, IdType chunk_index=0) |
| Sets chunk position to the specific vertex chunk and edge chunk. More... | |
Static Public Member Functions | |
| static Result< std::shared_ptr< AdjListArrowChunkReader > > | Make (const std::shared_ptr< EdgeInfo > &edge_info, AdjListType adj_list_type, const std::string &prefix) |
| Create an AdjListArrowChunkReader instance from edge info. More... | |
| static Result< std::shared_ptr< AdjListArrowChunkReader > > | Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &src_type, const std::string &edge_type, const std::string &dst_type, AdjListType adj_list_type) |
| Create an AdjListArrowChunkReader instance from graph info. More... | |
The arrow chunk reader for adj list topology chunk.
Definition at line 277 of file chunk_reader.h.
| graphar::AdjListArrowChunkReader::AdjListArrowChunkReader | ( | const std::shared_ptr< EdgeInfo > & | edge_info, |
| AdjListType | adj_list_type, | ||
| const std::string & | prefix | ||
| ) |
Initialize the AdjListArrowChunkReader.
| edge_info | The edge info that describes the edge type. |
| adj_list_type | The adj list type for the edge. |
| prefix | The absolute prefix. |
Definition at line 516 of file chunk_reader.cc.
|
static |
Create an AdjListArrowChunkReader instance from edge info.
| edge_info | The edge info. |
| adj_list_type | The adj list type for the edges. |
| prefix | The absolute prefix of the graph. |
Definition at line 703 of file chunk_reader.cc.
|
static |
Create an AdjListArrowChunkReader instance from graph info.
| graph_info | The graph info. |
| src_type | The source vertex type. |
| edge_type | The edge type. |
| dst_type | The destination vertex type. |
| adj_list_type | The adj list type for the edges. |
Definition at line 715 of file chunk_reader.cc.
| Status graphar::AdjListArrowChunkReader::next_chunk | ( | ) |
Sets chunk position indicator to next chunk.
Definition at line 655 of file chunk_reader.cc.
| Status graphar::AdjListArrowChunkReader::seek | ( | IdType | offset | ) |
Sets chunk position indicator for reader by edge index.
| offset | edge index of the vertex chunk. Note: the offset is the edge index of the vertex chunk, not the edge index of the whole graph. |
Definition at line 615 of file chunk_reader.cc.
| Status graphar::AdjListArrowChunkReader::seek_chunk_index | ( | IdType | vertex_chunk_index, |
| IdType | chunk_index = 0 |
||
| ) |
Sets chunk position to the specific vertex chunk and edge chunk.
| vertex_chunk_index | the vertex chunk index. |
| chunk_index | the edge chunk index of vertex_chunk_index. |
Definition at line 676 of file chunk_reader.cc.
| Status graphar::AdjListArrowChunkReader::seek_dst | ( | IdType | offset | ) |
Sets chunk position indicator for reader by destination vertex id.
| id | the destination vertex id. |
Definition at line 583 of file chunk_reader.cc.
| Status graphar::AdjListArrowChunkReader::seek_src | ( | IdType | id | ) |
Sets chunk position indicator for reader by source vertex id.
| id | the source vertex id. |
Definition at line 550 of file chunk_reader.cc.