Tests | Refactor NativeVectorFloat32Tests for future Half support#4347
Open
edwardneal wants to merge 27 commits into
Open
Tests | Refactor NativeVectorFloat32Tests for future Half support#4347edwardneal wants to merge 27 commits into
edwardneal wants to merge 27 commits into
Conversation
Removed use of var, ensured that all variables are disposed of where trivial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is somewhat inspired by #4234. We don't yet have support for
SqlVector<Half>and other types, but this should hopefully make the test logic trivial to add.I'd recommend moving commit by commit - the introduction of a base class has resulted in the PR looking much larger than it truly is.
The overall design is now more generic. We have:
NativeVectorTestDataBase<TElement>, which contains test data forSqlVector<TElement>NativeVectorTestsBase<TElement, TTestData>, which contains the test logic and links it to the test dataVectorFloat32TestData: derived from NativeVectorTestDataBase which containsfloat-based sample dataNativeVectorFloat32Tests: the same tests and the same logic as in main, but derived from NativeVectorTestsBaseAdding future support for
Halfshould mean simply introducingVectorFloat16TestDataandNativeVectorFloat16Testsclasses:I've also made a handful of hygiene improvements, but none are particularly controversial:
Assert.Fail, performingAssert.True(!verifyReader.IsDBNull(0), ...), etc.)Issues
In lieu of any more specific issue for Half/float16 support for SqlVector, this contributes to #3444.
Testing
All automated tests continue to pass.