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

Need proper handling of case for identifiers #37

Closed
hab6 opened this issue Mar 8, 2024 · 1 comment
Closed

Need proper handling of case for identifiers #37

hab6 opened this issue Mar 8, 2024 · 1 comment

Comments

@hab6
Copy link
Contributor

hab6 commented Mar 8, 2024

The IngresDialect class contains metadata "get" methods (get_columns, get_primary_keys, get_table_names ...) that call denormalize_name which translates any passed identifier names to lower case. This is incorrect behavior and causes problems with databases having mixed case or upper case object names.

PR #35 contains additional details.

Also, related issue #36 deals with proper handling of character encoding.

@hab6
Copy link
Contributor Author

hab6 commented Mar 12, 2024

(Comments from @clach04 about this issue)

select * FROM iidbcapabilities WHERE cap_capability like '%CASE%'
Executing . . .
 
 
+--------------------------------+--------------------------------+
|cap_capability                  |cap_value                       |
+--------------------------------+--------------------------------+
|MIXEDCASE_NAMES                 |N                               |
|DB_NAME_CASE                    |LOWER                           |
|DB_DELIMITED_CASE               |LOWER                           |
|DB_REAL_USER_CASE               |LOWER                           |
+--------------------------------+--------------------------------+

Is the sanity check needed to make decisions. Also compare with ODBC metadata query interface, new option, 139795:

(ATTENTION, ODBC)
PowerBI cannot access tables with mixedcase if DB_NAME_CASE is set as LOWER and
DB_DELIMITED_CASE is set as MIXED.
Default behaviour of odbc driver - converting catalog object name case based on
DB_NAME_CASE & DB_DELIMITED_CASE is disabled. This can be enabled by 
passing new driver option METADATA_FORCE_CASE=Y as connection string.
(139795)

At least two options:

  1. use ODBC meta interface - I'm recommending against this option, as this will ONLY work with ODBC driver as implementation (I would like us to support multiple drivers)
  2. update/add logic to sqlalchemy-ingres to implement similar logic as the ODBC driver. Worth pinging connectivity team and/or checking drive metadata source code (or ping me to locate change for the SIR number above).

With the Actian Data Platform (nee Avalanche) different results are expected for the query above in comment #22 (comment)

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

No branches or pull requests

2 participants