forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
SQLColumns Implementation #66
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
16802f0
Implement SQLTables
rscales b5dfa49
Add draft tests
alinaliBQ d40467b
Merge branch 'alina-test-tables' into sql-columns
alinaliBQ 3292ac5
Initial impl for SQLColumns
alinaliBQ a7a9826
Add test for SQLColumns
alinaliBQ 2e496c8
Move SQLColumn tests to new file
alinaliBQ c35fb70
Merge branch 'apache-odbc' into sql-columns
alinaliBQ 1f6c8c4
Move helper functions to odbc_test_suite.h
alinaliBQ ff8574b
Add columns test with all supported column types
alinaliBQ 49e08a8
Draft code for creating unicode table and tests
alinaliBQ a26a50e
Add tests to check all columns
alinaliBQ 213fb7d
Clean up comments
alinaliBQ 7908c20
Remove SQLTables implementation
alinaliBQ 7def8c5
nit
alinaliBQ feb8f2b
Update helper functions for testing
alinaliBQ 49532e7
Add null check for schema
alinaliBQ 4f23a72
Use 1 function to check all 18 columns in SQLColumns
alinaliBQ e012e50
Address comments from James
alinaliBQ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQLColumns is one of the functions that behaves differently in ODBC 2.x vs. ODBC 3.x and up. The SQL type it returns for datetime types changes depending on whether you're using ODBC 2 or 3. For example SQL_TIME=11 vs. SQL_TYPE_TIME=91 (or something similar to this).
Also the column names differ in 2 vs. 3:
TABLE_QUALIFIER in 2 and TABLE_CAT in 3.
This is also the case for SQLTables.
Please add a test for ODBC 2.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the column names difference, we will add a test as part of SQLDescribeCol implementation in milestone 3. Yes the ODBC2 vs. 3 is pretty important, I remember the macOS Excel (which uses ODBC2) breaking and not getting database names because a driver I worked on before was returning
TABLE_CATas column name.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will look for a way to test time types with remote server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found the diff on odbc 2 and odbc 3:
Ref: https://learn.microsoft.com/en-us/sql/odbc/reference/appendixes/datetime-data-types?view=sql-server-ver17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added the test for different data type return value for SQLColumns, and added todo comment for SQLDescribeCol tests