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

column case sensitivity on index creation #91

Closed
brianmajor opened this issue Nov 12, 2019 · 2 comments
Closed

column case sensitivity on index creation #91

brianmajor opened this issue Nov 12, 2019 · 2 comments
Labels

Comments

@brianmajor
Copy link
Member

In youcat, if one tries to create an index on a column with the incorrect case it results in a null pointer exception.

TableUpdateRunner initially gets the column (description) through the table. This succeeds because TableDescription.getColumn() uses equalsIgnoreCase().

This allows the index creation to proceed, only to fail later (line 235) where a case-sensitive query for the column is executed and returns null.

@brianmajor brianmajor added the bug label Nov 12, 2019
@pdowler
Copy link
Member

pdowler commented Nov 13, 2019

Even though the PostgreSQL back end is not case sensitive, the other specs that talk about table and column names (eg TAP) explicitly say that clients must use the names exactly as provided in the tap_schema... so case sensitive.

It's OK to use equalsIgnoreCase to make things work as long as it is thorough. The actual sequence should:

  1. find the column in the TableDesc using equalsIgnoreCase
  2. use the exact table name and column name (from TableDesc and ColumnDesc) in the create index statement (in case back end is case-sensitive)
  3. find/update column as in SQL query with HAVING SubSelect gives NullPointerException #1

@brianmajor
Copy link
Member Author

Okay. Steps 1 and 2 you describe above were already the case. I've made the change for 3 in this pull request.

pdowler added a commit that referenced this issue Nov 13, 2019
Fixes #91 - column case sensitivity on index creation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants