sqlmesh icon indicating copy to clipboard operation
sqlmesh copied to clipboard

Fix(redshift): regression in varchar length workaround

Open treysp opened this issue 1 year ago • 1 comments

NOTE: redshift integration tests won't pass until sqlglot is bumped > 25.24.4

#2791 introduced a regression in the varchar length workaround because it assumed the columns() method returned data types including their length/precision. That was true for MSSQL, but wasn't for Redshift.

This PR updates Redshift's columns() method to attach length/precision to data types.

Note: the _columns_query() method allowed postgres and redshift to use different columns queries inside postgres' columns() method. Redshift now needs to override the entire columns() method, so _columns_query() has been removed from postgres.

treysp avatar Oct 04 '24 15:10 treysp

Feedback addressed, also updated the MSSQL implementation to align

treysp avatar Oct 04 '24 19:10 treysp

NOTE: redshift integration tests won't pass until sqlglot is bumped > 25.24.4

Released v25.24.5.

georgesittas avatar Oct 08 '24 12:10 georgesittas

Will this be included in sqlmesh 0.126.1 or 0.127.0? When is the next release scheduled for?

jrhorne avatar Oct 09 '24 18:10 jrhorne

@jrhorne Just released v0.126.1, should be available in pypi shortly https://github.com/TobikoData/sqlmesh/releases/tag/v0.126.1

treysp avatar Oct 09 '24 23:10 treysp