Skip to content

Conversation

@caicancai
Copy link
Contributor

The current test only checks for errors, but doesn't check the error type. Perhaps this could be improved.

example

    fn test_primitive_array_validation_failure_length_mismatch() {
        // Invalid case: validity length doesn't match buffer length.
        let buffer = Buffer::from_iter([1i32, 2, 3]);
        let validity = Validity::from_iter([true, false]); // Length 2, buffer is length 3.
        let result = PrimitiveArray::try_new(buffer, validity);

        assert!(matches!(result, Err(VortexError::InvalidArgument(_, _))));
        assert!(result.is_err());
    }

Signed-off-by: cancaicai <2356672992@qq.com>
@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.93%. Comparing base (4bbafe7) to head (78ba745).
⚠️ Report is 24 commits behind head on develop.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@caicancai
Copy link
Contributor Author

@joseph-isaacs Sorry to bother you, but I'll take a look at this small change when I have time and see if it's appropriate.

Copy link
Contributor

@joseph-isaacs joseph-isaacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but please do come with a larger scale PR if want to update tests next time

@joseph-isaacs joseph-isaacs enabled auto-merge (squash) January 19, 2026 09:38
@joseph-isaacs joseph-isaacs added the changelog/fix A bug fix label Jan 19, 2026
@caicancai
Copy link
Contributor Author

caicancai commented Jan 19, 2026

Thanks, but please do come with a larger scale PR if want to update tests next time

Thank you for the reminder. I probably won't be updating the test results separately anymore, as I've already started delving into and learning about the Vortex functionality.

@joseph-isaacs joseph-isaacs merged commit 28a2252 into vortex-data:develop Jan 19, 2026
48 of 50 checks passed
danking pushed a commit that referenced this pull request Feb 6, 2026
The current test only checks for errors, but doesn't check the error
type. Perhaps this could be improved.

example
```
    fn test_primitive_array_validation_failure_length_mismatch() {
        // Invalid case: validity length doesn't match buffer length.
        let buffer = Buffer::from_iter([1i32, 2, 3]);
        let validity = Validity::from_iter([true, false]); // Length 2, buffer is length 3.
        let result = PrimitiveArray::try_new(buffer, validity);

        assert!(matches!(result, Err(VortexError::InvalidArgument(_, _))));
        assert!(result.is_err());
    }
```

Signed-off-by: cancaicai <2356672992@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants