Open feriki opened 6 days ago
I thought we can not just append something to string. @MrPresent-Han please help on it
public static byte[] incrementBytes(byte[] value) {
if (value == null || value.length == 0) {
throw new IllegalArgumentException("Input byte array cannot be null or empty");
}
byte[] newValue = value.clone();
boolean carry = true;
int index = newValue.length - 1;
while (carry && index >= 0) {
if (newValue[index] == (byte) 0xFF) {
newValue[index] = 0;
index--;
} else {
newValue[index]++;
carry = false;
}
}
// If carry is still true, this means we have overflowed beyond the most significant byte
if (carry) {
byte[] extendedValue = new byte[newValue.length + 1];
System.arraycopy(newValue, 0, extendedValue, 1, newValue.length);
extendedValue[0] = 1; // Add a new leading byte
return extendedValue;
}
return newValue;
}
看起来是io.milvus.orm.iterator.QueryIterator#setupNextExpr方法导致的,使用的milvus-sdk-java版本是2.3.6,如图![21](https://github.com/milvus-io/milvus-sdk-java/assets/29164761/13676549-7060-44b8-b405-b19798cf5f00)