#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 colRows; std::vector colNulls; std::vector colIntValues; std::vector colDoubleValues; std::vector colByteArrayValues; int rowId; int rowGroupId; int numRows; int numRowGroups; int rowsLeftInRowGroup; void nextRowGroup(); public: ParquetCursor(ParquetTable* table); int getRowId(); void next(); bool eof(); void ensureColumn(int col); bool isNull(int col); int getInt(int col); double getDouble(int col); parquet::ByteArray* getByteArray(int col); parquet::Type::type getPhysicalType(int col); /* sqlite3_result_double() sqlite3_result_int() sqlite3_result_int64() sqlite3_result_null() sqlite3_result_text() */ }; #endif