|
Apache GraphAr C++ Library
The C++ Library for Apache GraphAr
|
The arrow chunk reader for vertex property group. More...
#include <chunk_reader.h>
Public Member Functions | |
| VertexPropertyArrowChunkReader (const std::shared_ptr< VertexInfo > &vertex_info, const std::shared_ptr< PropertyGroup > &property_group, const std::string &prefix, const util::FilterOptions &options={}) | |
| Initialize the VertexPropertyArrowChunkReader. More... | |
| VertexPropertyArrowChunkReader (const std::shared_ptr< VertexInfo > &vertex_info, const std::shared_ptr< PropertyGroup > &property_group, const std::vector< std::string > &property_names, const std::string &prefix, const util::FilterOptions &options={}) | |
| Initialize the VertexPropertyArrowChunkReader. More... | |
| VertexPropertyArrowChunkReader (const std::shared_ptr< VertexInfo > &vertex_info, const std::vector< std::string > &labels, const std::string &prefix, const util::FilterOptions &options={}) | |
| Initialize the VertexPropertyArrowChunkReader. More... | |
| Status | seek (IdType id) |
| Sets chunk position indicator for reader by internal vertex id. If internal vertex id is not found, will return Status::IndexError error. After seeking to an invalid vertex id, the next call to GetChunk function may undefined, e.g. return an non exist path. More... | |
| Result< std::shared_ptr< arrow::Table > > | GetChunk (GetChunkVersion version=GetChunkVersion::AUTO) |
| Return the current arrow chunk table of chunk position indicator. | |
| Result< std::shared_ptr< arrow::Table > > | GetLabelChunk () |
| Return the current arrow label chunk table of chunk position indicator. | |
| Status | next_chunk () |
| Sets chunk position indicator to next chunk. More... | |
| IdType | GetChunkNum () const noexcept |
| Get the chunk number of current vertex property group. | |
| 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< VertexPropertyArrowChunkReader > > | Make (const std::shared_ptr< VertexInfo > &vertex_info, const std::shared_ptr< PropertyGroup > &property_group, const std::string &prefix, const util::FilterOptions &options={}) |
| Create a VertexPropertyArrowChunkReader instance from vertex info. More... | |
| static Result< std::shared_ptr< VertexPropertyArrowChunkReader > > | Make (const std::shared_ptr< VertexInfo > &vertex_info, const std::shared_ptr< PropertyGroup > &property_group, const std::vector< std::string > &property_names, const std::string &prefix, const util::FilterOptions &options={}) |
| Create a VertexPropertyArrowChunkReader instance from vertex info. More... | |
| static Result< std::shared_ptr< VertexPropertyArrowChunkReader > > | Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &type, const std::shared_ptr< PropertyGroup > &property_group, const util::FilterOptions &options={}) |
| Create a VertexPropertyArrowChunkReader instance from graph info and property group. More... | |
| static Result< std::shared_ptr< VertexPropertyArrowChunkReader > > | Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &type, const std::string &property_name, const util::FilterOptions &options={}) |
| Create a VertexPropertyArrowChunkReader instance from graph info and property name. More... | |
| static Result< std::shared_ptr< VertexPropertyArrowChunkReader > > | Make (const std::shared_ptr< GraphInfo > &graph_info, const std::string &type, const std::vector< std::string > &property_names_or_labels, const SelectType select_type, const util::FilterOptions &options={}) |
| Create a VertexPropertyArrowChunkReader instance from vertex info for labels. More... | |
| static Result< std::shared_ptr< VertexPropertyArrowChunkReader > > | Make (const std::shared_ptr< VertexInfo > &vertex_info, const std::vector< std::string > &labels, const std::string &prefix, const util::FilterOptions &options={}) |
| Create a VertexPropertyArrowChunkReader instance from vertex info for labels. More... | |
| static Result< std::shared_ptr< VertexPropertyArrowChunkReader > > | MakeForProperties (const std::shared_ptr< GraphInfo > &graph_info, const std::string &type, const std::vector< std::string > &property_names, const util::FilterOptions &options={}) |
| Create a VertexPropertyArrowChunkReader instance from graph info for properties. More... | |
| static Result< std::shared_ptr< VertexPropertyArrowChunkReader > > | MakeForLabels (const std::shared_ptr< GraphInfo > &graph_info, const std::string &type, const std::vector< std::string > &labels, const util::FilterOptions &options={}) |
| Create a VertexPropertyArrowChunkReader instance from graph info for labels. More... | |
The arrow chunk reader for vertex property group.
Definition at line 43 of file chunk_reader.h.
| graphar::VertexPropertyArrowChunkReader::VertexPropertyArrowChunkReader | ( | const std::shared_ptr< VertexInfo > & | vertex_info, |
| const std::shared_ptr< PropertyGroup > & | property_group, | ||
| const std::string & | prefix, | ||
| const util::FilterOptions & | options = {} |
||
| ) |
Initialize the VertexPropertyArrowChunkReader.
| vertex_info | The vertex info that describes the vertex type. |
| property_group | The property group that describes the property group. |
| prefix | The absolute prefix. |
Definition at line 154 of file chunk_reader.cc.
| graphar::VertexPropertyArrowChunkReader::VertexPropertyArrowChunkReader | ( | const std::shared_ptr< VertexInfo > & | vertex_info, |
| const std::shared_ptr< PropertyGroup > & | property_group, | ||
| const std::vector< std::string > & | property_names, | ||
| const std::string & | prefix, | ||
| const util::FilterOptions & | options = {} |
||
| ) |
Initialize the VertexPropertyArrowChunkReader.
| vertex_info | The vertex info that describes the vertex type. |
| property_group | The property group that describes the property group. |
| property_names | Only these properties will be read. |
| prefix | The absolute prefix. |
Definition at line 161 of file chunk_reader.cc.
| graphar::VertexPropertyArrowChunkReader::VertexPropertyArrowChunkReader | ( | const std::shared_ptr< VertexInfo > & | vertex_info, |
| const std::vector< std::string > & | labels, | ||
| const std::string & | prefix, | ||
| const util::FilterOptions & | options = {} |
||
| ) |
Initialize the VertexPropertyArrowChunkReader.
| vertex_info | The vertex info that describes the vertex type. |
| labels | The labels of the vertex type. |
| prefix | The absolute prefix. |
Definition at line 187 of file chunk_reader.cc.
| void graphar::VertexPropertyArrowChunkReader::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 360 of file chunk_reader.cc.
|
static |
Create a VertexPropertyArrowChunkReader instance from graph info and property group.
| graph_info | The graph info. |
| type | The vertex type. |
| property_group | The property group of the vertex property. |
| options | The filter options, default is empty. |
Definition at line 388 of file chunk_reader.cc.
|
static |
Create a VertexPropertyArrowChunkReader instance from graph info and property name.
| graph_info | The graph info. |
| type | The vertex type. |
| property_name | The name of one property in the property group you want to read. |
| options | The filter options, default is empty. |
Definition at line 402 of file chunk_reader.cc.
|
static |
Create a VertexPropertyArrowChunkReader instance from vertex info for labels.
| vertex_info | The vertex info. |
| labels | The name of labels you want to read. |
| select_type | The select type, properties or labels. |
| prefix | The absolute prefix of the graph. |
| options | The filter options, default is empty. |
Definition at line 426 of file chunk_reader.cc.
|
static |
Create a VertexPropertyArrowChunkReader instance from vertex info.
| vertex_info | The vertex info. |
| property_group | The property group of the vertex property. |
| prefix | The absolute prefix of the graph. |
| options | The filter options, default is empty. |
Definition at line 369 of file chunk_reader.cc.
|
static |
Create a VertexPropertyArrowChunkReader instance from vertex info.
| vertex_info | The vertex info. |
| property_group | The property group of the vertex property. |
| property_names | is not empty, only these properties will be read. |
| prefix | The absolute prefix of the graph. |
| options | The filter options, default is empty. |
Definition at line 378 of file chunk_reader.cc.
|
static |
Create a VertexPropertyArrowChunkReader instance from vertex info for labels.
| vertex_info | The vertex info. |
| labels | The name of labels you want to read. |
| prefix | The absolute prefix of the graph. |
| options | The filter options, default is empty. |
Definition at line 494 of file chunk_reader.cc.
|
static |
Create a VertexPropertyArrowChunkReader instance from graph info for labels.
| graph_info | The graph info. |
| type | The vertex type. |
| labels | The name of labels you want to read. |
| prefix | The absolute prefix of the graph. |
| options | The filter options, default is empty. |
Definition at line 503 of file chunk_reader.cc.
|
static |
Create a VertexPropertyArrowChunkReader instance from graph info for properties.
| graph_info | The graph info. |
| type | The vertex type. |
| property_names | The name of properties you want to read. |
| prefix | The absolute prefix of the graph. |
| options | The filter options, default is empty. |
Definition at line 440 of file chunk_reader.cc.
| Status graphar::VertexPropertyArrowChunkReader::next_chunk | ( | ) |
Sets chunk position indicator to next chunk.
if current chunk is the last chunk, will return Status::IndexError error.
Definition at line 348 of file chunk_reader.cc.
| Status graphar::VertexPropertyArrowChunkReader::seek | ( | IdType | id | ) |
Sets chunk position indicator for reader by internal vertex id. If internal vertex id is not found, will return Status::IndexError error. After seeking to an invalid vertex id, the next call to GetChunk function may undefined, e.g. return an non exist path.
| id | the vertex id. |
Definition at line 209 of file chunk_reader.cc.
| void graphar::VertexPropertyArrowChunkReader::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 364 of file chunk_reader.cc.