-
Notifications
You must be signed in to change notification settings - Fork 172
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
chore: Move some utility methods to submodules of scalar_funcs #590
Conversation
@andygrove, @tshauck and @comphead would you mind to take you at this once CI passes? |
} | ||
} | ||
|
||
pub fn spark_xxhash64(args: &[ColumnarValue]) -> Result<ColumnarValue, DataFusionError> { |
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.
Its not this PR problem but we need a description to pub methods
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.
Additionally, might consider limiting the scope. This function probably isn't needed outside of scalar_funcs
.
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.
but we need a description to pub methods
I can add a description here.
Additionally, might consider limiting the scope. This function probably isn't needed outside of scalar_funcs.
Yeah, I originally limited it to pub(super)
. However we are accessing it in the benchmark module which needs public interface. I think we can leave it as it is and address access scope later by rewriting the benchmark code.
match seed { | ||
ColumnarValue::Scalar(ScalarValue::Int32(Some(seed))) => { | ||
// iterate over the arguments to find out the length of the array | ||
let num_rows = args[0..args.len() - 1] |
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.
any chance here to be an index out of bounds?
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 don't think so. The seed is always provided in the Spark/JVM side.
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.
Others probably have more substantive feedback, but in terms of a good step for better organization, this LGTM
} | ||
} | ||
|
||
pub fn spark_xxhash64(args: &[ColumnarValue]) -> Result<ColumnarValue, DataFusionError> { |
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.
Additionally, might consider limiting the scope. This function probably isn't needed outside of scalar_funcs
.
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.
Looks good. One minor question
Gently ping @comphead @andygrove and @kazuyukitanimura |
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
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 thanks @advancedxy
Merged. Thanks @advancedxy @kazuyukitanimura @tshauck @comphead |
Thanks everyone for reviewing. |
…e#590) * chore: Move some utility methods to submodules of scalar_funcs * Address comments
Which issue does this PR close?
Rationale for this change
This is a follow-up as discussed in #449 (comment)
What changes are included in this PR?
How are these changes tested?
Existing tests with one slightly modification.