This is an automated email from the ASF dual-hosted git repository.
menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new b0f850b76d8 Refactor LocalDataQueryResultRow to handle "null" (#33150)
b0f850b76d8 is described below
commit b0f850b76d8cd824e93de160572dd29de051e004
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Oct 8 11:23:48 2024 +0800
Refactor LocalDataQueryResultRow to handle "null" (#33150)
---
.../infra/merge/result/impl/local/LocalDataQueryResultRow.java | 2 +-
.../infra/merge/result/impl/local/LocalDataQueryResultRowTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/infra/merge/src/main/java/org/apache/shardingsphere/infra/merge/result/impl/local/LocalDataQueryResultRow.java
b/infra/merge/src/main/java/org/apache/shardingsphere/infra/merge/result/impl/local/LocalDataQueryResultRow.java
index 49cd6442258..e44f5237c0d 100644
---
a/infra/merge/src/main/java/org/apache/shardingsphere/infra/merge/result/impl/local/LocalDataQueryResultRow.java
+++
b/infra/merge/src/main/java/org/apache/shardingsphere/infra/merge/result/impl/local/LocalDataQueryResultRow.java
@@ -42,7 +42,7 @@ public final class LocalDataQueryResultRow {
}
private Object convert(final Object data) {
- if (null == data) {
+ if (null == data || "null".equals(data)) {
return "";
}
if (data instanceof Optional) {
diff --git
a/infra/merge/src/test/java/org/apache/shardingsphere/infra/merge/result/impl/local/LocalDataQueryResultRowTest.java
b/infra/merge/src/test/java/org/apache/shardingsphere/infra/merge/result/impl/local/LocalDataQueryResultRowTest.java
index 491e6c969a9..14eb4cc9cfd 100644
---
a/infra/merge/src/test/java/org/apache/shardingsphere/infra/merge/result/impl/local/LocalDataQueryResultRowTest.java
+++
b/infra/merge/src/test/java/org/apache/shardingsphere/infra/merge/result/impl/local/LocalDataQueryResultRowTest.java
@@ -42,7 +42,7 @@ class LocalDataQueryResultRowTest {
@Test
void assertGetCellWithNullValue() {
- LocalDataQueryResultRow actual = new LocalDataQueryResultRow(null,
null);
+ LocalDataQueryResultRow actual = new LocalDataQueryResultRow(null,
"null");
assertThat(actual.getCell(1), is(""));
assertThat(actual.getCell(2), is(""));
}