zerolbsony commented on code in PR #17279:
URL: https://github.com/apache/iotdb/pull/17279#discussion_r2944197556
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/TimePartitionUtils.java:
##########
@@ -122,6 +130,23 @@ public static long getTimePartitionIdWithoutOverflow(long
time) {
return partitionId.longValue();
}
+ public static long getTimeWithoutOverflow(long partitionId) {
+ BigInteger bigTime =
bigTimePartitionInterval.multiply(BigInteger.valueOf(partitionId));
+ if (bigTime.compareTo(BigInteger.ZERO) > 0
+ ||
bigTime.remainder(bigTimePartitionInterval).equals(BigInteger.ZERO)) {
+ return bigTime.add(bigTimePartitionOrigin).longValue();
+ }
+ return BigInteger.valueOf(partitionId)
+ .add(BigInteger.ONE)
+ .multiply(bigTimePartitionInterval)
Review Comment:
Changed yet
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]