[breaking change] fix 265, log should be log10, and add ln#271
[breaking change] fix 265, log should be log10, and add ln#271alamb merged 1 commit intoapache:masterfrom
Conversation
alamb
left a comment
There was a problem hiding this comment.
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 ?
| 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.
perhaps we should keep a log entry / alias to log10 for postgres compatibility?
There was a problem hiding this comment.
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.
here the macro defs shall not allow dups
There was a problem hiding this comment.
Definitely in favour of Postgres behaviour. 👍
alamb
left a comment
There was a problem hiding this comment.
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 |
+---------------------+---------------------+
* fix: Fix arrow error when sorting on empty batch * Add RecordBatchOptions for Expand
* Introduce to_variant trait function to LogicalNode and create Explain LogicalNode bindings * Cargo fmt * bindings for Extension LogicalNode * Add missing classes to list of exports so test_imports will pass * Update to point to proper repo * Update pytest to adhere to aggregate calls being wrapped in projections * Address linter change which causes a pytest to fail * Add bindings for LogicalPlan::CreateMemoryTable
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 #123indicates 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 changelabel.