oracle / oracle/nosql-java-sdk
TO DO: "Sort empty types?"
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 34
- Forks
- 27
- Avg merge
- 13h 59m
- Merged PRs (30d)
- 2
Description
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.
@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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/main/java/oracle/nosql/driver/values/NullValue.java and the compareTo entry point, then inspect the FieldValue comparison contract. The issue does not define how empty types should be ordered, so first establish the intended ordering and edge cases. Done means the behavior is agreed, implemented, and covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100