-
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
[breaking change] fix 265, log should be log10, and add ln #271
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.
I think this is a good fix personally.
I recommend we add some sort of end to end sql test that runs these functions and compares the results, but otherwise 👍 from me. Any thoughts @jorgecarleitao or @seddonm1 ?
@@ -1086,9 +1086,9 @@ unary_scalar_expr!(Trunc, trunc); | |||
unary_scalar_expr!(Abs, abs); | |||
unary_scalar_expr!(Signum, signum); | |||
unary_scalar_expr!(Exp, exp); | |||
unary_scalar_expr!(Log, ln); |
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.
perhaps we should keep a log
entry / alias to log10
for postgres compatibility?
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 guess it's kept at the https://github.com/apache/arrow-datafusion/pull/271/files#diff-97178da6c90bfcb5e3dc80f06248ac1aebdec5a0e0e1d8ea235e2f571b5badf8R227 level, not 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.
here the macro defs shall not allow dups
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.
Definitely in favour of Postgres behaviour. 👍
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.
see #275
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.
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 gave it a little spin and it looks good. Thank you @jimexist !
> CREATE EXTERNAL TABLE t(a double) STORED AS CSV LOCATION '/tmp/foo.csv';
0 rows in set. Query took 0 seconds.
> select * from t;
+---------+
| a |
+---------+
| 1 |
| 2 |
| 3 |
| 3.14159 |
+---------+
4 row in set. Query took 0 seconds.
> select log(a), log10(a) from t;
+---------------------+---------------------+
| log(a) | log10(a) |
+---------------------+---------------------+
| 0 | 0 |
| 0.3010299956639812 | 0.3010299956639812 |
| 0.47712125471966244 | 0.47712125471966244 |
| 0.4971495058611233 | 0.4971495058611233 |
+---------------------+---------------------+
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 #265.
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.
What changes are included in this PR?
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 there any user-facing changes?
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
breaking change
label.