Skip to content

TO DO: "Sort empty types?" #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ronaldngounou opened this issue Jan 24, 2025 · 0 comments
Open

TO DO: "Sort empty types?" #141

ronaldngounou opened this issue Jan 24, 2025 · 0 comments

Comments

@ronaldngounou
Copy link

ronaldngounou commented Jan 24, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant