You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "IOhacker (via GitHub)" <gi...@apache.org> on 2025/03/03 02:20:50 UTC
[PR] FINERACT-2195 [fineract]
IOhacker opened a new pull request, #4400:
URL: https://github.com/apache/fineract/pull/4400
## Description
FINERACT-2195 fixes the Cast conversion from numeric that is causing in MariaDB issues while executing the SQL
Ignore if these details are present on the associated [Apache Fineract JIRA ticket](https://github.com/apache/fineract/pull/1284).
## Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
- [X ] Write the commit message as per https://github.com/apache/fineract/#pull-requests
- [X ] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
- [] Create/update unit or integration tests for verifying the changes made.
- [X ] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
- [X] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
- [X] Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2195: Fixes the Cast conversion from numeric that is causing in MariaDB issues while executing the SQL [fineract]
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #4400:
URL: https://github.com/apache/fineract/pull/4400#discussion_r1977795008
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGenerator.java:
##########
@@ -161,7 +161,7 @@ public String dateDiff(String date1, String date2) {
public String castChar(String sql) {
if (databaseTypeResolver.isMySQL()) {
- return format("CAST(%s AS CHAR)", sql);
+ return format("CAST(%s AS CHAR) COLLATE utf8mb4_unicode_ci", sql);
Review Comment:
@IOhacker Can you help me understand this more? By default i would not be big fan of hardcoding any collation... Can you please share here and or in the story a little bit more information about this bug?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2195: Fixes the Cast conversion from numeric that is causing in MariaDB issues while executing the SQL [fineract]
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #4400:
URL: https://github.com/apache/fineract/pull/4400#issuecomment-2695499214
@IOhacker Would you mind to attach a test case which covers now it is working correctly and to avoid if someone in the future removes this collation, it will fail!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2195: Fixes the Cast conversion from numeric that is causing in MariaDB issues while executing the SQL [fineract]
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy merged PR #4400:
URL: https://github.com/apache/fineract/pull/4400
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2195: Fixes the Cast conversion from numeric that is causing in MariaDB issues while executing the SQL [fineract]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4400:
URL: https://github.com/apache/fineract/pull/4400#issuecomment-2774031742
This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2195: Fixes the Cast conversion from numeric that is causing in MariaDB issues while executing the SQL [fineract]
Posted by "IOhacker (via GitHub)" <gi...@apache.org>.
IOhacker commented on PR #4400:
URL: https://github.com/apache/fineract/pull/4400#issuecomment-2694755617
@vidakovic @adamsaghy could you give me some feedback/comment?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2195: Fixes the Cast conversion from numeric that is causing in MariaDB issues while executing the SQL [fineract]
Posted by "IOhacker (via GitHub)" <gi...@apache.org>.
IOhacker commented on code in PR #4400:
URL: https://github.com/apache/fineract/pull/4400#discussion_r1977868435
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGenerator.java:
##########
@@ -161,7 +161,7 @@ public String dateDiff(String date1, String date2) {
public String castChar(String sql) {
if (databaseTypeResolver.isMySQL()) {
- return format("CAST(%s AS CHAR)", sql);
+ return format("CAST(%s AS CHAR) COLLATE utf8mb4_unicode_ci", sql);
Review Comment:
@adamsaghy I have added in the Jira ticket the error that is faced now. Seems that by default the CAST function is using utf8mb4_general_ci
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org