smaheshwar-pltr commented on code in PR #3511:
URL: https://github.com/apache/iceberg-python/pull/3511#discussion_r3432188352
##########
tests/table/test_init.py:
##########
@@ -338,6 +338,25 @@ def test_table_scan_projection_unknown_column(table_v2:
Table) -> None:
assert "Could not find column: 'a'" in str(exc_info.value)
+def
test_data_scan_plan_files_no_current_snapshot(example_table_metadata_no_snapshot_v1:
dict[str, Any]) -> None:
+ # A table with no current snapshot must plan zero files (rather than
raising) across every
+ # read path. DataScan routes local planning through ManifestGroupPlanner,
which has no
+ # snapshot guard of its own, so the guard lives in
DataScan._plan_files_local.
Review Comment:
Feels too in-depth for a code comment. And tests shouldn't depend on
implementation so closely. Maybe remove this entirely and use AI Reviewer Aid
review comment to justify why you've added this test in this PR
##########
tests/table/test_init.py:
##########
@@ -338,6 +338,22 @@ def test_table_scan_projection_unknown_column(table_v2:
Table) -> None:
assert "Could not find column: 'a'" in str(exc_info.value)
+def
test_data_scan_plan_files_no_current_snapshot(example_table_metadata_no_snapshot_v1:
dict[str, Any]) -> None:
Review Comment:
[AI reviewer aid] Regression test added with this refactor. `DataScan`'s
local planning now routes through the extracted `ManifestGroupPlanner`, which
has no snapshot of its own, so the no-current-snapshot guard now lives in
`DataScan._plan_files_local`. This pins that path (`plan_files` / `count` /
`to_arrow` return empty rather than raise) — there was no prior coverage for it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]