-
Notifications
You must be signed in to change notification settings - Fork 41
[PECOBLR-414]Prepared Statement getMetaData to work without executing Query #838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b78a9fc
0d26579
1730e93
46c7d5a
a045145
f2a61b5
64d3e93
77c0eca
e83ca9d
332f66d
3c1ddbf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -449,6 +449,28 @@ public String stripTypeName(String typeName) { | |
| if (typeArgumentIndex != -1) { | ||
| return typeName.substring(0, typeArgumentIndex); | ||
| } | ||
|
|
||
| return typeName; | ||
| } | ||
|
|
||
| public String stripBaseTypeName(String typeName) { | ||
| if (typeName == null) { | ||
| return null; | ||
| } | ||
| // Checking '<' first and then '(' to handle cases like MAP<STRING,INT>(50) | ||
|
|
||
| // Checks for ARRAY<STRING> -> ARRAY | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is done only for this use case? Not needed for other cases?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean by other cases ?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant for regular resultSetMetadata, why is this being added now? I was more thinking if we are adding duplicate code
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't reuse the same code, because current code is written for SEA which returns |
||
| int typeArgumentIndex = typeName.indexOf('<'); | ||
| if (typeArgumentIndex != -1) { | ||
| return typeName.substring(0, typeArgumentIndex); | ||
| } | ||
|
|
||
| // Checks for DECIMAL(10,2) -> DECIMAL | ||
| typeArgumentIndex = typeName.indexOf('('); | ||
| if (typeArgumentIndex != -1) { | ||
| return typeName.substring(0, typeArgumentIndex); | ||
| } | ||
|
|
||
| return typeName; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.