You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "iamhucong (via GitHub)" <gi...@apache.org> on 2023/10/11 01:30:14 UTC
[PR] Fix the case sensitivity issue caused by using CaseInsensitiveMap keys. [shardingsphere]
iamhucong opened a new pull request, #28713:
URL: https://github.com/apache/shardingsphere/pull/28713
---
Before committing this PR, I'm sure that I have checked the following options:
- [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [ ] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the case sensitivity issue caused by using CaseInsensitiveMap keys. [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu merged PR #28713:
URL: https://github.com/apache/shardingsphere/pull/28713
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix the case sensitivity issue caused by using CaseInsensitiveMap keys. [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #28713:
URL: https://github.com/apache/shardingsphere/pull/28713#discussion_r1353829993
##########
proxy/backend/type/hbase/src/main/java/org/apache/shardingsphere/proxy/backend/hbase/result/query/HBaseGetResultSet.java:
##########
@@ -140,7 +141,18 @@ private void setColumnNames(final Iterator<Result> rows) {
if (rows.hasNext()) {
compensateResult = rows.next();
}
- columnNames = null == compensateResult ? Arrays.asList(ROW_KEY_COLUMN_NAME, CONTENT_COLUMN_NAME) : parseResult(compensateResult).keySet();
+ columnNames = null == compensateResult ? Arrays.asList(ROW_KEY_COLUMN_NAME, CONTENT_COLUMN_NAME) : parseResultColumnNames(compensateResult);
+ }
+
+ private Collection<String> parseResultColumnNames(final Result result) {
+ Collection<String> row = new ArrayList<>(result.listCells().size() + 2);
+ row.add(ROW_KEY_COLUMN_NAME);
+ for (Cell each : result.listCells()) {
+ String column = new String(CellUtil.cloneQualifier(each), StandardCharsets.UTF_8);
+ row.add(column);
+ }
+ row.add(TIMESTAMP_COLUMN_NAME);
+ return row;
Review Comment:
Please rename row to result.
##########
proxy/backend/type/hbase/src/main/java/org/apache/shardingsphere/proxy/backend/hbase/result/query/HBaseGetResultSet.java:
##########
@@ -140,7 +141,18 @@ private void setColumnNames(final Iterator<Result> rows) {
if (rows.hasNext()) {
compensateResult = rows.next();
}
- columnNames = null == compensateResult ? Arrays.asList(ROW_KEY_COLUMN_NAME, CONTENT_COLUMN_NAME) : parseResult(compensateResult).keySet();
+ columnNames = null == compensateResult ? Arrays.asList(ROW_KEY_COLUMN_NAME, CONTENT_COLUMN_NAME) : parseResultColumnNames(compensateResult);
+ }
+
+ private Collection<String> parseResultColumnNames(final Result result) {
+ Collection<String> row = new ArrayList<>(result.listCells().size() + 2);
Review Comment:
Why use array list here?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org