#ifndef PARQUET_CURSOR_H #define PARQUET_CURSOR_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 numRows; int numRowGroups; int rowsLeftInRowGroup; bool nextRowGroup(); public: ParquetCursor(ParquetTable* table); int getRowId(); void next(); bool eof(); void ensureColumn(int col); bool isNull(int col); parquet::Type::type getPhysicalType(int col); parquet::LogicalType::type getLogicalType(int col); int getInt32(int col); long getInt64(int col); double getDouble(int col); parquet::ByteArray* getByteArray(int col); }; #endif