This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 8ac927e3295 Add more TODO comments on DataConsistencyCheckUtils
(#32770)
8ac927e3295 is described below
commit 8ac927e329581fdabb1808e78d15b1ba9c569367
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Sep 2 19:46:27 2024 +0800
Add more TODO comments on DataConsistencyCheckUtils (#32770)
* Add more TODO comments on DataConsistencyCheckUtils
* Add more TODO comments on DataConsistencyCheckUtils
* Add more TODO comments on DataConsistencyCheckUtils
---
.../pipeline/core/consistencycheck/DataConsistencyCheckUtils.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/DataConsistencyCheckUtils.java
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/DataConsistencyCheckUtils.java
index 2936e34cfa1..26b55ec352e 100644
---
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/DataConsistencyCheckUtils.java
+++
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/DataConsistencyCheckUtils.java
@@ -86,7 +86,10 @@ public final class DataConsistencyCheckUtils {
if (thisColumnValue instanceof SQLXML && thatColumnValue instanceof
SQLXML) {
return ((SQLXML) thisColumnValue).getString().equals(((SQLXML)
thatColumnValue).getString());
}
- // TODO Use different match strategy for heterogeneous database or not
+ /*
+ * TODO To avoid precision inconsistency issues, the current
comparison of Timestamp columns across heterogeneous databases ignores
`milliseconds` precision. In the future, different
+ * strategies with different database types could be considered.
+ */
if (thisColumnValue instanceof Timestamp && thatColumnValue instanceof
Timestamp) {
return ((Timestamp) thisColumnValue).getTime() / 1000L * 1000L ==
((Timestamp) thatColumnValue).getTime() / 1000L * 1000L;
}