Skip to content

Add spaces around concat operator #2555

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 1 commit into from
Sep 21, 2020
Merged

Conversation

hazzik
Copy link
Member

@hazzik hazzik commented Sep 21, 2020

Some dialects (DB2 for example) are confused by the concat operator without spaces. So let's just tweak it.

I did consider overriding only DB2Dialect but I think it is more beneficial if applied to all dialects.

@hazzik hazzik merged commit 44f3406 into nhibernate:master Sep 21, 2020
Copy link
Member

@fredericDelaporte fredericDelaporte left a comment

Choose a reason for hiding this comment

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

Isn't that more a bug fix than an improvement? I tend to think that

Some dialects (DB2 for example) are confused by the concat operator without spaces

means these dialects yield wrong results in such case or fail to execute the query.

This PR could also have removed the now redundant identical fix in HanaDialectBase.

@hazzik hazzik deleted the concat-spacing branch September 21, 2020 19:37
@hazzik
Copy link
Member Author

hazzik commented Sep 21, 2020

This PR could also have removed the now redundant identical fix in HanaDialectBase.

It is commented out there

Isn't that more a bug fix than an improvement?

Maybe... I’ll reclassify

@bahusoid
Copy link
Member

It is commented out there

Nope:

RegisterFunction("concat", new VarArgsSQLFunction("(", " || ", ")"));

@hazzik
Copy link
Member Author

hazzik commented Sep 21, 2020

Nope

Ok, I was thinking about some other dialect.

@fredericDelaporte
Copy link
Member

fredericDelaporte commented Sep 21, 2020

Yes another dialect has it commented out, with a bunch of other registrations. (Code commented out should be removed, there is no point in keeping it in most case. But that was not the subject of this PR of course.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants