@@ -43,6 +43,43 @@ class ICEBERG_EXPORT ScanTask {
4343 virtual int64_t estimated_row_count () const = 0;
4444};
4545
46+ // / \brief Task representing a data file and its corresponding delete files.
47+ class ICEBERG_EXPORT FileScanTask : public ScanTask {
48+ public:
49+ explicit FileScanTask (std::shared_ptr<DataFile> data_file);
50+
51+ // / \brief The data file that should be read by this scan task.
52+ const std::shared_ptr<DataFile>& data_file () const ;
53+
54+ // / \brief The total size in bytes of the file split to be read.
55+ int64_t size_bytes () const override ;
56+
57+ // / \brief The number of files that should be read by this scan task.
58+ int32_t files_count () const override ;
59+
60+ // / \brief The number of rows that should be read by this scan task.
61+ int64_t estimated_row_count () const override ;
62+
63+ /* *
64+ * \brief Returns an ArrowArrayReader to read the data for this task.
65+ *
66+ * This acts as a factory to instantiate a file-format-specific reader (e.g., Parquet)
67+ * based on the metadata in this task and the provided parameters.
68+ *
69+ * \param projected_schema The projected schema for reading the data.
70+ * \param filter Optional filter expression to apply during reading.
71+ * \param io The FileIO instance for accessing the file data.
72+ * \return A Result containing a unique pointer to the reader, or an error on failure.
73+ */
74+ Result<std::unique_ptr<ArrowArrayReader>> ToArrowArrayReader (
75+ const std::shared_ptr<Schema>& projected_schema,
76+ const std::shared_ptr<Expression>& filter, const std::shared_ptr<FileIO>& io) const ;
77+
78+ private:
79+ // / \brief Data file metadata.
80+ std::shared_ptr<DataFile> data_file_;
81+ };
82+
4683// / \brief Scan context holding snapshot and scan-specific metadata.
4784struct TableScanContext {
4885 // / \brief Table metadata.
@@ -169,40 +206,4 @@ class ICEBERG_EXPORT DataTableScan : public TableScan {
169206 Result<std::vector<std::shared_ptr<FileScanTask>>> PlanFiles () const override ;
170207};
171208
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-
208209} // namespace iceberg
0 commit comments