Merged
Conversation
Redshift JDBC driver returns `Invalid VARCHAR length -5` for column type during select from view created as: ``` CREATE VIEW test_view AS SELECT CAST(NULL AS CHARACTER VARYING) AS value ``` According to Postgres documentation: `atttypmod int4` atttypmod records type-specific data supplied at table creation time (for example, the maximum length of a varchar column). It is passed to type-specific input functions and length coercion functions. The value will generally be -1 for types that do not need atttypmod. Seems Redshift JDBC driver uses that in a wrong way - atttypmod is not applicable for null.
Contributor
Author
|
@bhvkshah @Brooke-white @iggarish @hyandell Could you please take a look on this PR? |
Contributor
|
@ssheikin will have an update for you once I've reviewed your changes. Thank you for the PR! |
|
@bhvkshah any update on that PR? |
Brooke-white
approved these changes
Dec 14, 2022
Contributor
Brooke-white
left a comment
There was a problem hiding this comment.
thank you @ssheikin ! looks good :)
Contributor
Author
|
Thank you @Brooke-white @bhvkshah for merging! |
findinpath
added a commit
to findinpath/trino
that referenced
this pull request
Mar 13, 2023
Corresponding pr to Redshift JDBC driver: aws/amazon-redshift-jdbc-driver#75 Co-authored-by: Sasha Sheikin <myminitrue@gmail.com>
ebyhr
pushed a commit
to trinodb/trino
that referenced
this pull request
Mar 13, 2023
Corresponding pr to Redshift JDBC driver: aws/amazon-redshift-jdbc-driver#75 Co-authored-by: Sasha Sheikin <myminitrue@gmail.com>
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.
Redshift JDBC driver returns
Invalid VARCHAR length -5for column type during select from view created as:According to Postgres documentation:
atttypmod int4atttypmod records type-specific data supplied at table creation time (for example, the maximum length of a varchar column). It is passed to type-specific input functions and length coercion functions. The value will generally be -1 for types that do not need atttypmod.
Seems Redshift JDBC driver uses that in a wrong way - atttypmod is not applicable for null.
Description
Fix not possible length for varchar.
Motivation and Context
Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn installsucceedsLicense