-
Notifications
You must be signed in to change notification settings - Fork 924
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
Add java bindings for distinct count #13573
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Count how many rows in the column are distinct from one another. | ||
* @param nullPolicy if nulls should be included or not. | ||
*/ | ||
public int distinctCount(NullPolicy nullPolicy) { | ||
return distinctCount(getNativeView(), nullPolicy.includeNulls, false); | ||
} | ||
|
||
/** | ||
* Count how many rows in the column are distinct from one another. | ||
* Nulls are included. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also clarify the last parameter in the doc. What does false
mean here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What parameter? The false in the native code?
@@ -3999,6 +4015,8 @@ static DeviceMemoryBufferView getOffsetsBuffer(long viewHandle) { | |||
} | |||
|
|||
// Native Methods | |||
private static native int distinctCount(long handle, boolean nullsIncluded, boolean nansAreNulls); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this parameter? I don't see any public Java API calling it. If we are not using it then should we just remove it completely from Java code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it thinking that there was a java enum that corresponded to it, but never got around to adding in the enum. I can remove it if we want to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please remove it.
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Too many empty lines.
/merge |
Description
This adds in java bindings for cudf::distinct_count for both table and column APIs.
Checklist