#ifndef PARQUET_CURSOR_H #define PARQUET_CURSOR_H #include "parquet_filter.h" #include "parquet_table.h" #include "parquet/api/reader.h" class ParquetCursor { ParquetTable* table; std::unique_ptr reader; std::unique_ptr rowGroupMetadata; std::shared_ptr rowGroup; std::vector> scanners; std::vector types; std::vector logicalTypes; std::vector colRows; std::vector colNulls; std::vector colIntValues; std::vector colDoubleValues; std::vector colByteArrayValues; int rowId; int rowGroupId; int rowGroupStartRowId; int numRows; int numRowGroups; int rowsLeftInRowGroup; bool nextRowGroup(); std::vector constraints; public: ParquetCursor(ParquetTable* table); int getRowId(); bool currentRowSatisfiesFilter(); void next(); void close(); void reset(std::vector constraints); bool eof(); void ensureColumn(int col); bool isNull(int col); parquet::Type::type getPhysicalType(int col); parquet::LogicalType::type getLogicalType(int col); ParquetTable* getTable(); int getInt32(int col); long getInt64(int col); double getDouble(int col); parquet::ByteArray* getByteArray(int col); }; #endif