-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
move make_array array_append array_prepend array_concat function to datafusion-functions-array crate #9504
Conversation
because #9343 pr lasting for too long,difficult to rebase or merge, so I open a new pr |
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 take a quick glance and I think it is ready to merge.
There are 2 things that I'm trying to figure out to improve further
- Make sure we have
Scalar
that we needmake_scalar_function_with_hints
, since I think we should only getArray
for array functions, if we really haveScalar
, it seems something wrong to me. - Simplify cfg feature flag, I would like to change
OperatorToFunction
toOperatorToArrayFunciton
and see whether we can import the entire rule (file) optionally.
They don't need to be solved in this PR, but I think they are possible to be improved
datafusion/optimizer/Cargo.toml
Outdated
@@ -44,6 +45,7 @@ async-trait = { workspace = true } | |||
chrono = { workspace = true } | |||
datafusion-common = { workspace = true, default-features = true } | |||
datafusion-expr = { workspace = true } | |||
datafusion-functions-array = { workspace = true, optional = true } |
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.
@alamb I think having optional importing is fine. Is there any other downside to this?
let me rebase and fix the conflicts |
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
I think we need |
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 @guojidan
array element, // arg name | ||
"appends an element to the end of an array.", // doc | ||
array_append_udf // internal function name |
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.
array element, // arg name | |
"appends an element to the end of an array.", // doc | |
array_append_udf // internal function name | |
array element, | |
"appends an element to the end of an array.", | |
array_append_udf |
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 believe that we can get rid of these comments since the structure is apparent.
element array, // arg name | ||
"Prepends an element to the beginning of an array.", // doc | ||
array_prepend_udf // internal function name |
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.
element array, // arg name | |
"Prepends an element to the beginning of an array.", // doc | |
array_prepend_udf // internal function name | |
element array, | |
"Prepends an element to the beginning of an array.", | |
array_prepend_udf |
"Concatenates arrays.", // doc | ||
array_concat_udf // internal function name |
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.
"Concatenates arrays.", // doc | |
array_concat_udf // internal function name | |
"Concatenates arrays.", | |
array_concat_udf |
"Returns an Arrow array using the specified input expressions.", // doc | ||
make_array_udf // internal function name |
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.
"Returns an Arrow array using the specified input expressions.", // doc | |
make_array_udf // internal function name | |
"Returns an Arrow array using the specified input expressions.", | |
make_array_udf |
but maybe we should call another name, it is not the same as |
@Weijun-H I think we can merge this and improve others on follow up PR |
but I have no idea why the test is running endless |
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
I want to split them to different files to avoid crazy conflict |
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Upd2: I found out the reason and solution. It seems super slow to run 2031259 has been canceled after 6hr, so the issue might be the change in this PR. |
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Which issue does this PR close?
Closes #9322.
Rationale for this change
What changes are included in this PR?
move make_array array_append array_prepend array_concat function to datafusion-functions-array crate
Are these changes tested?
Are there any user-facing changes?