Skip to content

test: achieve 100% test coverage for lance-arrow json module#5430

Merged
wjones127 merged 1 commit intolance-format:mainfrom
wjones127:json-coverage-100
Dec 10, 2025
Merged

test: achieve 100% test coverage for lance-arrow json module#5430
wjones127 merged 1 commit intolance-format:mainfrom
wjones127:json-coverage-100

Conversation

@wjones127
Copy link
Copy Markdown
Contributor

Summary

  • Add 24 new tests covering all functions and branches in lance-arrow/src/json.rs
  • Simplify decode_json to return String directly (can't fail)
  • Simplify to_arrow_json to return ArrayRef directly
  • Replace unreachable error handling with expect() for type-checked downcasts
  • Simplify get_json_path using the ? operator

Test plan

  • All 37 json module tests pass
  • Verified 100% line/branch/function/region coverage via cargo +nightly llvm-cov

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 8, 2025

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@wjones127 wjones127 changed the title Achieve 100% test coverage for lance-arrow json module test: achieve 100% test coverage for lance-arrow json module Dec 8, 2025
@github-actions github-actions Bot added the chore label Dec 8, 2025
- Add 24 new tests covering all functions and branches
- Simplify decode_json to return String (can't fail)
- Simplify to_arrow_json to return ArrayRef directly
- Replace unreachable error handling with expect() for type-checked downcasts
- Simplify get_json_path using the ? operator

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@wjones127 wjones127 marked this pull request as ready for review December 10, 2025 01:01
@wjones127 wjones127 merged commit 4ae8c47 into lance-format:main Dec 10, 2025
27 checks passed
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
…ormat#5430)

## Summary
- Add 24 new tests covering all functions and branches in
`lance-arrow/src/json.rs`
- Simplify `decode_json` to return `String` directly (can't fail)
- Simplify `to_arrow_json` to return `ArrayRef` directly
- Replace unreachable error handling with `expect()` for type-checked
downcasts
- Simplify `get_json_path` using the `?` operator

## Test plan
- [x] All 37 json module tests pass
- [x] Verified 100% line/branch/function/region coverage via `cargo
+nightly llvm-cov`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants