You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "izveigor (via GitHub)" <gi...@apache.org> on 2023/06/28 17:57:22 UTC

[GitHub] [arrow-datafusion] izveigor opened a new pull request, #6787: Minor: add test cases with columns for math expressions

izveigor opened a new pull request, #6787:
URL: https://github.com/apache/arrow-datafusion/pull/6787

   # 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.
   -->
   
   Follow on to #6771
   
   # Rationale for this change
   From the discussions (See PR: #6771) there was an idea to test all functions with columns.
   <!--
    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?
   Test cases with columns for all math functions.
   <!--
   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
   <!--
   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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb commented on pull request #6787: Minor: add test cases with columns for math expressions

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6787:
URL: https://github.com/apache/arrow-datafusion/pull/6787#issuecomment-1627764489

   @izveigor  what became of this PR? Would you like some help pushing it over the line?


-- 
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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb merged pull request #6787: Minor: add test cases with columns for math expressions

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #6787:
URL: https://github.com/apache/arrow-datafusion/pull/6787


-- 
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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] izveigor commented on pull request #6787: Minor: add test cases with columns for math expressions

Posted by "izveigor (via GitHub)" <gi...@apache.org>.
izveigor commented on PR #6787:
URL: https://github.com/apache/arrow-datafusion/pull/6787#issuecomment-1611855018

   Is the normal output `NaN`? Some SQL databases do not support the statement and prefer to use `NULL` or error output.
   Example:
   ```
   postgres=# select acosh(a), acosh(b), acosh(c) from signed_integers;
   ERROR:  input is out of range
   postgres=# select ln(a), ln(b), ln(c) from signed_integers;
   ERROR:  cannot take logarithm of a negative number
   postgres=# select log(a, 64) a, log(b), log(10, b) from signed_integers;
   ERROR:  cannot take logarithm of a negative number
   postgres=# select log(a), log(b), log(c) from signed_integers;
   ERROR:  cannot take logarithm of a negative number
   postgres=# select log2(a), log2(b), log2(c) from signed_integers;
   ERROR:  function log2(integer) does not exist
   LINE 1: select log2(a), log2(b), log2(c) from signed_integers;
                  ^
   HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
   postgres=# select power(a, b), power(c, d), power(e, f) from small_floats;
   ERROR:  a negative number raised to a non-integer power yields a complex result
   postgres=# select sqrt(a), sqrt(b), sqrt(c) from signed_integers;
   ERROR:  cannot take square root of a negative number
   ```


-- 
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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] izveigor commented on pull request #6787: Minor: add test cases with columns for math expressions

Posted by "izveigor (via GitHub)" <gi...@apache.org>.
izveigor commented on PR #6787:
URL: https://github.com/apache/arrow-datafusion/pull/6787#issuecomment-1627777631

   @alamb Honestly I forgot about this PR.
   Yes there were some problems with giving different results using different OS (the last digits did not match). I have solved the problem with using `round` function.


-- 
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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org