You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "marvinlanhenke (via GitHub)" <gi...@apache.org> on 2024/05/30 16:33:28 UTC
[PR] Minor: fix signature `fn octect_length()` [datafusion]
marvinlanhenke opened a new pull request, #10726:
URL: https://github.com/apache/datafusion/pull/10726
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #10676.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
- fix a minor issue about consistency
- fn signature should be the same as `fn bit_length()`
## What changes are included in this PR?
- changed `octet_length` to accept `Expr` instead of `Vec<Expr>`
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## Are these changes tested?
Yes. Existing tests.
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
## Are there any user-facing changes?
No.
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: fix signature `fn octect_length()` [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #10726:
URL: https://github.com/apache/datafusion/pull/10726#discussion_r1621501400
##########
datafusion/core/tests/expr_api/mod.rs:
##########
@@ -28,6 +28,23 @@ use std::sync::{Arc, OnceLock};
mod simplification;
+#[test]
+fn test_octet_length() {
Review Comment:
Since this fix is for the expr_fn API I don't think we can move this to .slt (the code path invoked needs to be invoked programatically, not via SQL)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: fix signature `fn octect_length()` [datafusion]
Posted by "marvinlanhenke (via GitHub)" <gi...@apache.org>.
marvinlanhenke commented on PR #10726:
URL: https://github.com/apache/datafusion/pull/10726#issuecomment-2140626318
thanks for the quick response @alamb - I added the test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: fix signature `fn octect_length()` [datafusion]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #10726:
URL: https://github.com/apache/datafusion/pull/10726#discussion_r1621407187
##########
datafusion/core/tests/expr_api/mod.rs:
##########
@@ -28,6 +28,23 @@ use std::sync::{Arc, OnceLock};
mod simplification;
+#[test]
+fn test_octet_length() {
Review Comment:
can we move it to slt?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: fix signature `fn octect_length()` [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #10726:
URL: https://github.com/apache/datafusion/pull/10726
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: fix signature `fn octect_length()` [datafusion]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #10726:
URL: https://github.com/apache/datafusion/pull/10726#discussion_r1621407495
##########
datafusion/functions/src/string/mod.rs:
##########
@@ -128,8 +128,8 @@ pub mod expr_fn {
}
#[doc = "returns the number of bytes of a string"]
- pub fn octet_length(args: Vec<Expr>) -> Expr {
- super::octet_length().call(args)
+ pub fn octet_length(args: Expr) -> Expr {
+ super::octet_length().call(vec![args])
Review Comment:
👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: fix signature `fn octect_length()` [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #10726:
URL: https://github.com/apache/datafusion/pull/10726#issuecomment-2140975724
Thanks again @marvinlanhenke and @comphead
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org