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

Escape collate (#220) #554

Merged
merged 3 commits into from
Apr 30, 2019
Merged

Escape collate (#220) #554

merged 3 commits into from
Apr 30, 2019

Conversation

doyaaaaaken
Copy link
Contributor

Hi, I try to implement fix for #220 bug.
If it's not correct, do not mind to close this PR.

@Tapac
Copy link
Contributor

Tapac commented Apr 30, 2019

Thank you for a PR. It looks pretty well but maybe it worth to add protected escape() function to StringColumnType to make code more readable?

@doyaaaaaken
Copy link
Contributor Author

@Tapac
Thank you! I fixed it in 912ddb9 .

@Tapac
Copy link
Contributor

Tapac commented Apr 30, 2019

And one more improvement - extract characterMap to something like a companion object or top-level private variable to prevent map allocation for every escape invocation.

Also, escape(value.toString()).forEach { append(it) } is not very effective. It should be changed to append(escape(value.toString())) or keeped as it was before.

@Tapac Tapac merged commit 4c7a9a4 into JetBrains:master Apr 30, 2019
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