Skip to content
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

[AD-771] fix issue of JDBC not returning tables #81

Merged
merged 4 commits into from
Jun 8, 2022

Conversation

alinaliBQ
Copy link
Contributor

@alinaliBQ alinaliBQ commented Jun 6, 2022

Summary

Make JDBC return tables/columns to ODBC

Description

  • Tableau passes catalog, schema, table name, and table type as null pointers to SQLTables.
    PowerBI passes catalog, schema, and table name as null pointers to SQLTables.

PowerBI passes column name as null pointers to SQLColumns.

Therefore, if null is passed in ODBC as table pattern, "%" needs to be passed as table pattern to JDBC.
Same thing with null being passed to ODBC as column name pattern.

Related Issue

https://bitquill.atlassian.net/browse/AD-771

Additional Reviewers

@affonsoBQ
@alexey-temnikov
@alinaliBQ
@andiem-bq
@birschick-bq
@mitchell-elholm
@RoyZhang2022

* Tableau passes catalog, schema, table name, and table type as null pointers to SQLTables.
PowerBI passes catalog, schema, and table name as null pointers to SQLTables.

PowerBI passes column name as null pointers to SQLColumns.

Therefore, if null is passed in ODBC as table pattern, "%" needs to be passed as table pattern to JDBC.
Same thing with null being passed to ODBC as column name pattern.
@alinaliBQ alinaliBQ marked this pull request as draft June 6, 2022 18:58
@github-actions
Copy link

github-actions bot commented Jun 6, 2022

MacOS Big Sur 11 Build Unit Test Results

    1 files  ±0    1 suites  ±0   17s ⏱️ -15s
170 tests ±0  76 ✔️ ±0  94 💤 ±0  0 ±0 
  76 runs  ±0  -18 ✔️ ±0  94 💤 ±0  0 ±0 

Results for commit 956ba6a. ± Comparison against base commit 4b22a54.

♻️ This comment has been updated with latest results.

@alinaliBQ alinaliBQ marked this pull request as ready for review June 6, 2022 19:10
@github-actions
Copy link

github-actions bot commented Jun 6, 2022

Windows 2022 (x64) Build Unit Test Results

    1 files  ±0    1 suites  ±0   34s ⏱️ +6s
170 tests ±0  76 ✔️ ±0  94 💤 ±0  0 ±0 
  76 runs  ±0  -18 ✔️ ±0  94 💤 ±0  0 ±0 

Results for commit 956ba6a. ± Comparison against base commit 4b22a54.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jun 6, 2022

Windows 2022 (x32) Build Unit Test Results

    1 files  ±0    1 suites  ±0   22s ⏱️ -5s
170 tests ±0  76 ✔️ ±0  94 💤 ±0  0 ±0 
  76 runs  ±0  -18 ✔️ ±0  94 💤 ±0  0 ±0 

Results for commit 956ba6a. ± Comparison against base commit 4b22a54.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jun 6, 2022

Ubuntu 20.04 Build Unit Test Results

    1 files  ±0    1 suites  ±0   5s ⏱️ ±0s
170 tests ±0  72 ✔️ ±0  98 💤 ±0  0 ±0 
  72 runs  ±0  68 ✔️ ±0    4 💤 ±0  0 ±0 

Results for commit 956ba6a. ± Comparison against base commit 4b22a54.

♻️ This comment has been updated with latest results.

@alinaliBQ
Copy link
Contributor Author

https://github.com/Bit-Quill/amazon-documentdb-odbc-driver-mirror/pull/34
PR opened on the mirror side also. Please code review the PR on the mirror side first

alinaliBQ added 2 commits June 8, 2022 10:25
* move comments for SQLTables and SQLColumns from odbc.h to odbc.cpp.
* refactor code to use `get_value_or` when retrieving values for table and column name
@alinaliBQ alinaliBQ merged commit f56d5ce into develop Jun 8, 2022
@affonsov affonsov deleted the alinaliBQ/AD-771/adapt-get-tables-columns branch November 2, 2022 21:58
affonsov pushed a commit that referenced this pull request Nov 16, 2022
affonsov pushed a commit that referenced this pull request Nov 16, 2022
### Summary

<!--- General summary / title -->
Make JDBC return tables/columns to ODBC
### Description

<!--- Details of what you changed -->
* Tableau passes catalog, schema, table name, and table type as null pointers to SQLTables.
PowerBI passes catalog, schema, and table name as null pointers to SQLTables.

PowerBI passes column name as null pointers to SQLColumns.

Therefore, if null is passed in ODBC as table pattern, "%" needs to be passed as table pattern to JDBC.
Same thing with null being passed to ODBC as column name pattern.
### Related Issue

<!--- Link to issue where this is tracked -->
https://bitquill.atlassian.net/browse/AD-771

* [AD-771] fix issue of JDBC not returning tables

* Tableau passes catalog, schema, table name, and table type as null pointers to SQLTables.
PowerBI passes catalog, schema, and table name as null pointers to SQLTables.

PowerBI passes column name as null pointers to SQLColumns.

Therefore, if null is passed in ODBC as table pattern, "%" needs to be passed as table pattern to JDBC.
Same thing with null being passed to ODBC as column name pattern.

* [AD-771] add checks for passing null table/column names

* [AD-771] resolve code review comments

* move comments for SQLTables and SQLColumns from odbc.h to odbc.cpp.
* refactor code to use `get_value_or` when retrieving values for table and column name
affonsov pushed a commit that referenced this pull request Nov 17, 2022
affonsov pushed a commit that referenced this pull request Nov 17, 2022
### Summary

<!--- General summary / title -->
Make JDBC return tables/columns to ODBC
### Description

<!--- Details of what you changed -->
* Tableau passes catalog, schema, table name, and table type as null pointers to SQLTables.
PowerBI passes catalog, schema, and table name as null pointers to SQLTables.

PowerBI passes column name as null pointers to SQLColumns.

Therefore, if null is passed in ODBC as table pattern, "%" needs to be passed as table pattern to JDBC.
Same thing with null being passed to ODBC as column name pattern.
### Related Issue

<!--- Link to issue where this is tracked -->
https://bitquill.atlassian.net/browse/AD-771

* [AD-771] fix issue of JDBC not returning tables

* Tableau passes catalog, schema, table name, and table type as null pointers to SQLTables.
PowerBI passes catalog, schema, and table name as null pointers to SQLTables.

PowerBI passes column name as null pointers to SQLColumns.

Therefore, if null is passed in ODBC as table pattern, "%" needs to be passed as table pattern to JDBC.
Same thing with null being passed to ODBC as column name pattern.

* [AD-771] add checks for passing null table/column names

* [AD-771] resolve code review comments

* move comments for SQLTables and SQLColumns from odbc.h to odbc.cpp.
* refactor code to use `get_value_or` when retrieving values for table and column name
alexey-temnikov pushed a commit that referenced this pull request Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants