You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading the nosql-java-sdk, I noticed there is a TO DO in the src/main/java/oracle/nosql/driver/values/NullValue.java file and I would like to work on it.
To my understanding, the NullValue class inherits from FieldValue. In the code below, the compareTo method is used to compare two FieldValue objects, returning a value indicating whether the current object (this) is less than, equal to, or greater than the other object. If the other object is a NullValue object, then return 0 else -1.
@Override
public int compareTo(FieldValue other) {
if (other instanceof NullValue) {
return 0;
}
/* TODO: sort empty types? */
return -1;
}
Although I did not understand the reason to 'sort empty types' comment, I would like to open this issue to suggest a solution.
The final solution should improve the base code to satisty edge cases.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hello Oracle,
When reading the nosql-java-sdk, I noticed there is a TO DO in the
src/main/java/oracle/nosql/driver/values/NullValue.java
file and I would like to work on it.To my understanding, the NullValue class inherits from FieldValue. In the code below, the compareTo method is used to compare two FieldValue objects, returning a value indicating whether the current object (this) is less than, equal to, or greater than the other object. If the other object is a NullValue object, then return 0 else -1.
Although I did not understand the reason to 'sort empty types' comment, I would like to open this issue to suggest a solution.
The final solution should improve the base code to satisty edge cases.
The text was updated successfully, but these errors were encountered: