Skip to content

fix: Handle parameterized and complex Trino types in type map - #6496

Merged
ntkathole merged 1 commit into
feast-dev:masterfrom
falloficaruss:fix/trino-type-map-parameterized-types
Aug 18, 2026
Merged

fix: Handle parameterized and complex Trino types in type map#6496
ntkathole merged 1 commit into
feast-dev:masterfrom
falloficaruss:fix/trino-type-map-parameterized-types

Conversation

@falloficaruss

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Fixes trino_type_map.py to properly handle parameterized Trino types (e.g., varchar(10), decimal(10,2)) and complex types (array(...), row(...), map(...)). Previously, \w+ regex in array(...) parsing, missing type map entries for varbinary/json/int/char(...), and unhandled row(...)/map(...) caused AttributeError, KeyError, or UnboundLocalError at runtime during schema introspection.

Which issue(s) this PR fixes:

Fixes #6489

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

@falloficaruss
falloficaruss requested a review from a team as a code owner June 11, 2026 01:57

@shuchu shuchu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@ntkathole
ntkathole force-pushed the fix/trino-type-map-parameterized-types branch from 8ef4d61 to 8605a05 Compare August 18, 2026 04:14
@codecov-commenter

codecov-commenter commented Aug 18, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.12%. Comparing base (a42dc85) to head (cff0ade).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ores/contrib/trino_offline_store/trino_type_map.py 93.75% 1 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6496      +/-   ##
==========================================
+ Coverage   46.92%   47.12%   +0.20%     
==========================================
  Files         416      416              
  Lines       50537    50614      +77     
  Branches     7252     7267      +15     
==========================================
+ Hits        23714    23853     +139     
+ Misses      25149    25072      -77     
- Partials     1674     1689      +15     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 48.47% <93.75%> (+0.21%) ⬆️
Files with missing lines Coverage Δ
...ores/contrib/trino_offline_store/trino_type_map.py 97.50% <93.75%> (+85.37%) ⬆️

... and 10 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a42dc85...cff0ade. Read the comment docs.

🚀 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.

@ntkathole
ntkathole force-pushed the fix/trino-type-map-parameterized-types branch from 8605a05 to 1c7441f Compare August 18, 2026 04:49
Signed-off-by: Abhishek Shinde <norizzabhii@gmail.com>
@ntkathole
ntkathole force-pushed the fix/trino-type-map-parameterized-types branch from 1c7441f to cff0ade Compare August 18, 2026 05:33
@ntkathole
ntkathole merged commit 326554d into feast-dev:master Aug 18, 2026
12 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TrinoOfflineStore: trino_type_map fails on parameterized and complex types

4 participants