Repository navigation
fix: Map INT32_LIST, PDF_BYTES and IMAGE_BYTES type names to their ValueType - #6969
Open
raashish1601 wants to merge 2 commits into
Open
raashish1601 wants to merge 2 commits into
raashish1601 wants to merge 2 commits into
Conversation
…lueType The INT32_LIST key in _convert_value_type_str_to_value_type had a trailing space, and PDF_BYTES and IMAGE_BYTES were missing, so all three fell back to STRING. The registry REST API uses this to describe feature types, so such features were reported (and rendered in the generated Field code) as String. Signed-off-by: Raashish Aggarwal <94279692+raashish1601@users.noreply.github.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6969 +/- ##
=======================================
Coverage 49.32% 49.32%
=======================================
Files 443 443
Lines 55094 55094
Branches 8017 8017
=======================================
Hits 27176 27176
Misses 26035 26035
Partials 1883 1883
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
What this PR does / why we need it:
_convert_value_type_str_to_value_typemaps value type names toValueType, falling back toSTRINGfor unknown names. Three names fall back by mistake:INT32_LISTkey is written as"INT32_LIST "(trailing space), so"INT32_LIST"never matches,PDF_BYTESandIMAGE_BYTESare not in the map.The registry REST API uses this function to turn a field's
valueTypeinto a Feast type (api/registry/rest/feature_views.py,features.py,data_sources.py), soArray(Int32),PdfBytesandImageBytesfeatures are reported asString, including in the generatedField(name=..., dtype=...)code. The Snowflake UDF helpercreate_entity_dictuses it too.This removes the trailing space and adds the two missing names.
Which issue(s) this PR fixes:
No issue, found while checking type name conversions for each
ValueType.Checks
git commit -s)Testing Strategy
Added
test_convert_value_type_str_round_trips_every_nameinsdk/python/tests/unit/test_type_map.py, which checks everyValueTypename; theINT32_LIST,PDF_BYTESandIMAGE_BYTEScases fail on master. The other tests of this function pass.ruff checkandruff format --checkare clean on the changed files.