Apache GraphAr C++ Library
The C++ Library for Apache GraphAr
|
The arrow chunk reader for edge property group chunks. More...
#include <chunk_reader.h>
Public Types | |
using | range_t = std::pair< IdType, IdType > |
Public Member Functions | |
AdjListPropertyArrowChunkReader (const std::shared_ptr< EdgeInfo > &edge_info, const std::shared_ptr< PropertyGroup > &property_group, AdjListType adj_list_type, const std::string prefix, const util::FilterOptions &options={}) | |
Initialize the AdjListPropertyArrowChunkReader. More... | |
AdjListPropertyArrowChunkReader (const AdjListPropertyArrowChunkReader &other) | |
Copy constructor. | |
Status | seek_src (IdType id) |
Sets chunk position indicator for reader by source vertex id. More... | |
Status | seek_dst (IdType id) |
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. | |
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... | |
void | Filter (util::Filter filter=nullptr) |
Apply the row filter to the table. No parameter call Filter() will clear the filter. More... | |
void | Select (util::ColumnNames column_names=std::nullopt) |
Apply the projection to the table to be read. No parameter call Select() will clear the projection. More... | |
Static Public Member Functions | |
static Result< std::shared_ptr< AdjListPropertyArrowChunkReader > > | Make (const std::shared_ptr< EdgeInfo > &edge_info, const std::shared_ptr< PropertyGroup > &property_group, AdjListType adj_list_type, const std::string &prefix, const util::FilterOptions &options={}) |
Create an AdjListPropertyArrowChunkReader instance from edge info. More... | |
static Result< std::shared_ptr< AdjListPropertyArrowChunkReader > > | Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &src_label, const std::string &edge_label, const std::string &dst_label, const std::shared_ptr< PropertyGroup > &property_group, AdjListType adj_list_type, const util::FilterOptions &options={}) |
Create an AdjListPropertyArrowChunkReader instance from graph info and property group. More... | |
static Result< std::shared_ptr< AdjListPropertyArrowChunkReader > > | Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &src_label, const std::string &edge_label, const std::string &dst_label, const std::string &property_name, AdjListType adj_list_type, const util::FilterOptions &options={}) |
Create an AdjListPropertyArrowChunkReader instance from graph info and property name. More... | |
The arrow chunk reader for edge property group chunks.
Definition at line 355 of file chunk_reader.h.
graphar::AdjListPropertyArrowChunkReader::AdjListPropertyArrowChunkReader | ( | const std::shared_ptr< EdgeInfo > & | edge_info, |
const std::shared_ptr< PropertyGroup > & | property_group, | ||
AdjListType | adj_list_type, | ||
const std::string | prefix, | ||
const util::FilterOptions & | options = {} |
||
) |
Initialize the AdjListPropertyArrowChunkReader.
edge_info | The edge info that describes the edge type. |
property_group | The property group that describes the property group. |
adj_list_type | The adj list type for the edges. |
prefix | The absolute prefix. |
Definition at line 569 of file chunk_reader.cc.
void graphar::AdjListPropertyArrowChunkReader::Filter | ( | util::Filter | filter = nullptr | ) |
Apply the row filter to the table. No parameter call Filter() will clear the filter.
filter | Predicate expression to filter rows. |
Definition at line 765 of file chunk_reader.cc.
|
static |
Create an AdjListPropertyArrowChunkReader instance from edge info.
edge_info | The edge info that describes the edge type. |
property_group | The property group that describes the property |
adj_list_type | The adj list type for the edges. |
prefix | The absolute prefix of the graph. |
options | The filter options, default is empty. |
Definition at line 774 of file chunk_reader.cc.
|
static |
Create an AdjListPropertyArrowChunkReader instance from graph info and property group.
graph_info | The graph info that describes the graph. |
src_label | The source vertex label. |
edge_label | The edge label. |
dst_label | The destination vertex label. |
property_group | The property group that describes the property group. |
adj_list_type | The adj list type for the edges. |
options | The filter options, default is empty. |
Definition at line 789 of file chunk_reader.cc.
|
static |
Create an AdjListPropertyArrowChunkReader instance from graph info and property name.
graph_info | The graph info that describes the graph. |
src_label | The source vertex label. |
edge_label | The edge label. |
dst_label | The destination vertex label. |
property_name | The name of one property in the property group you want to read. |
adj_list_type | The adj list type for the edges. |
options | The filter options, default is empty. |
Definition at line 804 of file chunk_reader.cc.
Status graphar::AdjListPropertyArrowChunkReader::next_chunk | ( | ) |
Sets chunk position indicator to next chunk.
Definition at line 726 of file chunk_reader.cc.
Status graphar::AdjListPropertyArrowChunkReader::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 677 of file chunk_reader.cc.
Status graphar::AdjListPropertyArrowChunkReader::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 750 of file chunk_reader.cc.
Status graphar::AdjListPropertyArrowChunkReader::seek_dst | ( | IdType | id | ) |
Sets chunk position indicator for reader by destination vertex id.
id | the destination vertex id. |
Definition at line 646 of file chunk_reader.cc.
Status graphar::AdjListPropertyArrowChunkReader::seek_src | ( | IdType | id | ) |
Sets chunk position indicator for reader by source vertex id.
id | the source vertex id. |
Definition at line 614 of file chunk_reader.cc.
void graphar::AdjListPropertyArrowChunkReader::Select | ( | util::ColumnNames | column_names = std::nullopt | ) |
Apply the projection to the table to be read. No parameter call Select() will clear the projection.
column_names | The name of columns to be selected. |
Definition at line 769 of file chunk_reader.cc.