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

[MONDRIAN-2471] fix for processing sql columns containing dots #694

Merged
merged 2 commits into from
May 31, 2016

Conversation

andmarkelov
Copy link

@mkambol @kurtwalker please merge

@mkambol
Copy link
Contributor

mkambol commented May 16, 2016

Hey @andrey-markelov,
I think this change is safe, but last we chatted about this one there was an open question about whether there is any need to support table references like "ower.table". I believe the answer to that is no, since the "schema" attribute on Table should do the same thing more cleanly, but it would be nice to know there's not a use case we aren't thinking of. Have you learned any more since last we exchanged emails?

@andmarkelov
Copy link
Author

@mkambol
Hi Matt. I am not absolutely sure that this old feature is being used somewhere, but I could not find for any usages of this form

@mkambol mkambol merged commit dd31197 into pentaho:master May 31, 2016
@@ -331,26 +331,10 @@ public void quoteIdentifier(final String val, final StringBuilder buf) {
return;
}

int k = val.indexOf('.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was purposely put in to handle "owner.table". and replacing that with "owner"."table". based on this commit:
2930d12#diff-26f86eb9f6e0b15e1c4af7f0457b0801

Do your test cases cover that ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbatchelor This logic scanning for the '.' is pretty ancient, and I think it pre-dates the "schema" attribute, which would be the preferred way to specify the "owner". Given that periods are allowed characters in table and column names in many databases, we can't safely extract the schema part based on the presence of the dot.

Including @lucboudreau in case he has any concerns.

buildguy pushed a commit that referenced this pull request Jan 24, 2024
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.

3 participants