@@ -644,23 +644,21 @@ Result<std::vector<std::shared_ptr<FileScanTask>>> DataTableScan::PlanFiles() co
644644// to the two-arg virtual PlanFiles() override in the concrete subclass.
645645// Defined as a friend to access the protected two-arg PlanFiles().
646646template <typename ScanTaskType>
647- Result<std::vector<std::shared_ptr<ScanTaskType>>> ResolvePlanFiles (
648- const IncrementalScan<ScanTaskType>& scan) {
649- if (IsScanCurrentLineage (scan. context () )) {
650- if (scan. metadata () ->current_snapshot_id == kInvalidSnapshotId ) {
647+ Result<std::vector<std::shared_ptr<ScanTaskType>>>
648+ IncrementalScan<ScanTaskType>::PlanFiles() const {
649+ if (IsScanCurrentLineage (context_ )) {
650+ if (metadata_ ->current_snapshot_id == kInvalidSnapshotId ) {
651651 return std::vector<std::shared_ptr<ScanTaskType>>{};
652652 }
653653 }
654654
655- ICEBERG_ASSIGN_OR_RAISE (
656- int64_t to_snapshot_id_inclusive,
657- internal::ToSnapshotIdInclusive (scan.context (), *scan.metadata ()));
655+ ICEBERG_ASSIGN_OR_RAISE (int64_t to_snapshot_id_inclusive,
656+ internal::ToSnapshotIdInclusive (context_, *metadata_));
658657 ICEBERG_ASSIGN_OR_RAISE (
659658 std::optional<int64_t > from_snapshot_id_exclusive,
660- internal::FromSnapshotIdExclusive (scan.context (), *scan.metadata (),
661- to_snapshot_id_inclusive));
659+ internal::FromSnapshotIdExclusive (context_, *metadata_, to_snapshot_id_inclusive));
662660
663- return scan. PlanFiles (from_snapshot_id_exclusive, to_snapshot_id_inclusive);
661+ return PlanFiles (from_snapshot_id_exclusive, to_snapshot_id_inclusive);
664662}
665663
666664// IncrementalAppendScan implementation
@@ -675,11 +673,6 @@ Result<std::unique_ptr<IncrementalAppendScan>> IncrementalAppendScan::Make(
675673 std::move (metadata), std::move (schema), std::move (io), std::move (context)));
676674}
677675
678- Result<std::vector<std::shared_ptr<FileScanTask>>> IncrementalAppendScan::PlanFiles ()
679- const {
680- return ResolvePlanFiles<FileScanTask>(*this );
681- }
682-
683676Result<std::vector<std::shared_ptr<FileScanTask>>> IncrementalAppendScan::PlanFiles (
684677 std::optional<int64_t > from_snapshot_id_exclusive,
685678 int64_t to_snapshot_id_inclusive) const {
@@ -754,15 +747,13 @@ Result<std::unique_ptr<IncrementalChangelogScan>> IncrementalChangelogScan::Make
754747 return NotImplemented (" IncrementalChangelogScan is not implemented" );
755748}
756749
757- Result<std::vector<std::shared_ptr<ChangelogScanTask>>>
758- IncrementalChangelogScan::PlanFiles () const {
759- return ResolvePlanFiles<ChangelogScanTask>(*this );
760- }
761-
762750Result<std::vector<std::shared_ptr<ChangelogScanTask>>>
763751IncrementalChangelogScan::PlanFiles (std::optional<int64_t > from_snapshot_id_exclusive,
764752 int64_t to_snapshot_id_inclusive) const {
765753 return NotImplemented (" IncrementalChangelogScan::PlanFiles is not implemented" );
766754}
767755
756+ template class ICEBERG_TEMPLATE_EXPORT IncrementalScan<FileScanTask>;
757+ template class ICEBERG_TEMPLATE_EXPORT IncrementalScan<ChangelogScanTask>;
758+
768759} // namespace iceberg
0 commit comments