Skip to content

feat(pytest): add read_table() and log_files() to DeltaTestLocation (#6135)#6219

Open
kimjune01 wants to merge 1 commit into
feldera:mainfrom
kimjune01:fix-delta-test-location-methods
Open

feat(pytest): add read_table() and log_files() to DeltaTestLocation (#6135)#6219
kimjune01 wants to merge 1 commit into
feldera:mainfrom
kimjune01:fix-delta-test-location-methods

Conversation

@kimjune01
Copy link
Copy Markdown

Summary

  • Add read_table() method to DeltaTestLocation that returns the Delta table as a PyArrow Table, with missing_ok parameter for graceful handling of non-existent tables
  • Add log_files() method that returns the list of data file URIs in the current Delta snapshot, also with missing_ok support
  • Both methods use deferred imports (matching the existing row_count pattern) to avoid crashes on aarch64 hosts

Fixes #6135

Test plan

  • 6 new unit tests covering: missing table with missing_ok=True/False, reading existing tables, listing files
  • All 37 total unit tests pass with no regressions
  • Tests gated with @skip_on_arm64 matching repo conventions

DeltaTestLocation.row_count() was sufficient for basic validation,
but tests that need to inspect table contents or verify file-level
behavior require richer access.

Add two methods:

* read_table(missing_ok=False) → pyarrow.Table | None
  Returns the current snapshot as a pyarrow Table. Useful for
  row-level assertions.

* log_files(missing_ok=False) → list[str]
  Returns the list of parquet file URIs in the current snapshot.
  Useful for verifying compaction, file count, and storage layout.

Both follow the existing pattern: deferred deltalake import to avoid
aarch64 import crashes, and missing_ok flag to probe caches.

Fixes feldera#6135

Signed-off-by: June Kim <june@ea.com>
Signed-off-by: June Kim <kimjune01@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pytest] add required methods to DeltaTestLocation

1 participant