-
Notifications
You must be signed in to change notification settings - Fork 186
Locale root #106
Locale root #106
Conversation
Sorry for the big change, I just had it done a while ago and now want to clean-up my local branches, so just decided to push. |
src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/StringUtils.java
Show resolved
Hide resolved
I think that for most of the cases (especially tests) we shouldn't use format at all. For example:
We don't need format here at all, we can just add index name into the query. Proposal: Split this PR into 2: StringUtils + the places where format is strictly necessary (non-test codebase, exception strings), and the rest (unit tests). The former PR will go easily, because it's needed, for the latter we can continue our conversation if format is actually needed there at all |
src/main/java/com/amazon/opendistroforelasticsearch/sql/utils/StringUtils.java
Outdated
Show resolved
Hide resolved
So I still suggest I address all the other comments and push the full change. Whenever and whoever decides to address your concern about using @dai-chen, @abbashus , @penghuo - what do you think? If you are in agreement with Andy's proposal, I will just keep the StringUtils addition along with unit tests, and revert all the other changes. |
I'm fine with either way (check in what you have now or revert) because we haven't figured out how to do it much better. Concat many pieces of string or hardcode entire query, both look not perfect to me. I think we can continue the discussion on another Issue/PR. |
Checked in the |
Closing this PR, since the essential part was already checked in as part of #107, and this code is outdated. |
Issue #, if available: N/A
Description of changes: Just creating utility methods not to make everyone use
Locale.ROOT
all the time. Plus fixed some warnings. Replaced all the usages ofString.format
in test classes, someone (maybe me) will need to do for non-test as well.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.