2222#include < string>
2323#include < vector>
2424
25+ #include " iceberg/arrow_array_reader.h"
2526#include " iceberg/manifest_entry.h"
2627#include " iceberg/type_fwd.h"
2728
@@ -42,23 +43,6 @@ class ICEBERG_EXPORT ScanTask {
4243 virtual int64_t estimated_row_count () const = 0;
4344};
4445
45- // / \brief Task representing a data file and its corresponding delete files.
46- class ICEBERG_EXPORT FileScanTask : public ScanTask {
47- public:
48- explicit FileScanTask (std::shared_ptr<DataFile> data_file);
49-
50- // / \brief The data file that should be read by this scan task.
51- const std::shared_ptr<DataFile>& data_file () const ;
52-
53- int64_t size_bytes () const override ;
54- int32_t files_count () const override ;
55- int64_t estimated_row_count () const override ;
56-
57- private:
58- // / \brief Data file metadata.
59- std::shared_ptr<DataFile> data_file_;
60- };
61-
6246// / \brief Scan context holding snapshot and scan-specific metadata.
6347struct TableScanContext {
6448 // / \brief Table metadata.
@@ -185,4 +169,40 @@ class ICEBERG_EXPORT DataTableScan : public TableScan {
185169 Result<std::vector<std::shared_ptr<FileScanTask>>> PlanFiles () const override ;
186170};
187171
172+ // / \brief Task representing a data file and its corresponding delete files.
173+ class ICEBERG_EXPORT FileScanTask : public ScanTask {
174+ public:
175+ explicit FileScanTask (std::shared_ptr<DataFile> data_file);
176+
177+ // / \brief The data file that should be read by this scan task.
178+ const std::shared_ptr<DataFile>& data_file () const ;
179+
180+ // / \brief The total size in bytes of the file split to be read.
181+ int64_t size_bytes () const override ;
182+
183+ // / \brief The number of files that should be read by this scan task.
184+ int32_t files_count () const override ;
185+
186+ // / \brief The number of rows that should be read by this scan task.
187+ int64_t estimated_row_count () const override ;
188+
189+ /* *
190+ * \brief Creates and returns an ArrowArrayReader to read the data for this task.
191+ *
192+ * This acts as a factory to instantiate a file-format-specific reader (e.g., Parquet)
193+ * based on the metadata in this task and the provided context.
194+ *
195+ * \param context The table scan context, used to configure the reader (e.g., with the
196+ * projected schema).
197+ * \param io The FileIO instance for accessing the file data.
198+ * \return A Result containing a unique pointer to the reader, or an error on failure.
199+ */
200+ Result<std::unique_ptr<ArrowArrayReader>> ToArrowArrayReader (
201+ const TableScanContext& context, const std::shared_ptr<FileIO>& io) const ;
202+
203+ private:
204+ // / \brief Data file metadata.
205+ std::shared_ptr<DataFile> data_file_;
206+ };
207+
188208} // namespace iceberg
0 commit comments