Fix getColumns
for Late binding views
#74
Merged
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.
... where column is a CASE numeric with null
If we have a late binding view defined as example view test_view, the JDBC driver will fail to obtain its schema through the standard JDBC method
DatabaseMetaData.getColumns
, with the following error:ERROR: invalid input syntax for integer: ""
Testcase:
Initial issue is described in
#45 Some specific field types in late-binding views cause the Redshift JDBC driver to throw an error on the
getColumns
call when fetching field metadata, but2.1.0.5
Fix Github issue 45
4c24b47
seems fix some of these cases, but not all.
Specifically, a case statement that produces a mix of numeric and null values still results in an error.
maybe issue was reintroduced with
2.1.0.8
Fix numeric scale issue with Numeric data type of an external table e080dd6
Description
Do not parse not existing precision (as i other parts of existing code)
Motivation and Context
#45 was not fixed completely.
Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsThis section is not appropriate for this project.
License