You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "2010YOUY01 (via GitHub)" <gi...@apache.org> on 2023/04/17 20:07:47 UTC

[GitHub] [arrow-datafusion] 2010YOUY01 opened a new pull request, #6037: Port math.rs to sqllogictest

2010YOUY01 opened a new pull request, #6037:
URL: https://github.com/apache/arrow-datafusion/pull/6037

   # 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.
   -->
   
   Part of https://github.com/apache/arrow-datafusion/issues/4495.
   
   # 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.  
   -->
   Ported tests in math.rs into sqllogictest.
   The engine for sqllogictest will round big decimals to 12 digits, so the output of test cases is also round to 12 digits.
   # 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 these changes tested?
   
   <!--
   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?
   
   <!--
   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] waynexia merged pull request #6037: Port math.rs to sqllogictest

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


-- 
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 #6037: Port math.rs to sqllogictest

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

   Thank you @2010YOUY01 and everyone who reviewed this!


-- 
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] 2010YOUY01 commented on a diff in pull request #6037: Port math.rs to sqllogictest

Posted by "2010YOUY01 (via GitHub)" <gi...@apache.org>.
2010YOUY01 commented on code in PR #6037:
URL: https://github.com/apache/arrow-datafusion/pull/6037#discussion_r1170457111


##########
datafusion/core/tests/sqllogictests/test_files/math.slt:
##########
@@ -87,3 +87,24 @@ query RRRRRRRR
 SELECT round(125.2345, -3), round(125.2345, -2), round(125.2345, -1), round(125.2345), round(125.2345, 0), round(125.2345, 1), round(125.2345, 2), round(125.2345, 3)
 ----
 0 100 130 125 125 125.2 125.23 125.235
+
+# Create table for atan2 test
+statement ok

Review Comment:
   Thank you for the feedback, I think even creating a table is not necessary. Updated



-- 
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] comphead commented on a diff in pull request #6037: Port math.rs to sqllogictest

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #6037:
URL: https://github.com/apache/arrow-datafusion/pull/6037#discussion_r1170500753


##########
datafusion/core/tests/sqllogictests/test_files/math.slt:
##########
@@ -87,3 +87,9 @@ query RRRRRRRR
 SELECT round(125.2345, -3), round(125.2345, -2), round(125.2345, -1), round(125.2345), round(125.2345, 0), round(125.2345, 1), round(125.2345, 2), round(125.2345, 3)
 ----
 0 100 130 125 125 125.2 125.23 125.235
+
+# atan2
+query RRRR

Review Comment:
   please include also tests with nulls. Its likely gap from prev implementation
   `atan2(null, 1.0), atan2(2.0, null)`
   



-- 
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] Weijun-H commented on pull request #6037: Port math.rs to sqllogictest

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

   LGTM


-- 
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] comphead commented on a diff in pull request #6037: Port math.rs to sqllogictest

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #6037:
URL: https://github.com/apache/arrow-datafusion/pull/6037#discussion_r1170178093


##########
datafusion/core/tests/sqllogictests/test_files/math.slt:
##########
@@ -87,3 +87,24 @@ query RRRRRRRR
 SELECT round(125.2345, -3), round(125.2345, -2), round(125.2345, -1), round(125.2345), round(125.2345, 0), round(125.2345, 1), round(125.2345, 2), round(125.2345, 3)
 ----
 0 100 130 125 125 125.2 125.23 125.235
+
+# Create table for atan2 test
+statement ok

Review Comment:
   its good to drop table after the test completed, or as alternative you can prepare data in WITH clause.
   



-- 
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] 2010YOUY01 commented on a diff in pull request #6037: Port math.rs to sqllogictest

Posted by "2010YOUY01 (via GitHub)" <gi...@apache.org>.
2010YOUY01 commented on code in PR #6037:
URL: https://github.com/apache/arrow-datafusion/pull/6037#discussion_r1170534897


##########
datafusion/core/tests/sqllogictests/test_files/math.slt:
##########
@@ -87,3 +87,9 @@ query RRRRRRRR
 SELECT round(125.2345, -3), round(125.2345, -2), round(125.2345, -1), round(125.2345), round(125.2345, 0), round(125.2345, 1), round(125.2345, 2), round(125.2345, 3)
 ----
 0 100 130 125 125 125.2 125.23 125.235
+
+# atan2
+query RRRR

Review Comment:
   Sure, expression tests for null cases can also be found [here](https://github.com/apache/arrow-datafusion/pull/2942/files#diff-d6e2f75f82c6d7f14f1bb07bc89293c7ef4c92c4c02241044e14ad9ea8ae213dR508), returning `NULL` seems to be expected



-- 
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