This is an automated email from the ASF dual-hosted git repository.
sunnianjun 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 48e9e52a7ef Refactor LocalDataQueryResultRow (#31848)
48e9e52a7ef is described below
commit 48e9e52a7ef9ab3ccf75408baaedb2ae20a9dc52
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Jun 25 22:26:27 2024 +0800
Refactor LocalDataQueryResultRow (#31848)
---
.../infra/merge/result/impl/local/LocalDataQueryResultRow.java | 4 ++++
1 file changed, 4 insertions(+)
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 bb23901bd00..868b7d46740 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
@@ -21,6 +21,7 @@ import com.google.common.base.Preconditions;
import org.apache.shardingsphere.infra.util.json.JsonUtils;
import java.time.LocalDateTime;
+import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -62,6 +63,9 @@ public final class LocalDataQueryResultRow {
if (data instanceof Map) {
return ((Map<?, ?>) data).isEmpty() ? "" :
JsonUtils.toJsonString(data);
}
+ if (data instanceof Collection) {
+ return ((Collection<?>) data).isEmpty() ? "" :
JsonUtils.toJsonString(data);
+ }
return JsonUtils.toJsonString(data);
}