You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/05/04 14:55:41 UTC

[GitHub] [arrow-datafusion] alamb opened a new pull request, #6230: Alamb/better error message

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

   # Which issue does this PR close?
   Follow on from https://github.com/apache/arrow-datafusion/pull/6201
   
   # Rationale for this change
   
   @crepererum  noticed that the error messages could be improved when trying to subtract things from intervals -- see https://github.com/apache/arrow-datafusion/pull/6201/files#r1183584830
   
   # What changes are included in this PR?
   
   Improve error message 
   
   # 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?
   
   <!--
   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 closed pull request #6230: Minor: improve error message for interval subtraction

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed pull request #6230: Minor: improve error message for interval subtraction
URL: https://github.com/apache/arrow-datafusion/pull/6230


-- 
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] ozankabak commented on a diff in pull request #6230: Minor: improve error message for interval subtraction

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


##########
datafusion/core/tests/sqllogictests/test_files/timestamps.slt:
##########
@@ -1031,7 +1031,7 @@ SELECT '2000-01-01T00:00:00'::timestamp - '2010-01-01T00:00:00'::timestamp;
 0 years 0 mons -3653 days 0 hours 0 mins 0.000000000 secs
 
 # Interval - Timestamp => error
-statement error DataFusion error: Error during planning: interval can't subtract timestamp/date
+statement error DataFusion error: Error during planning: Invalid interval subtraction: Interval\(MonthDayNano\) \- Timestamp\(Nanosecond, None\)

Review Comment:
   I agree it is better than status quo.



-- 
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 #6230: Minor: improve error message for interval subtraction

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

   Given this logic was refactored substantially, I think I am going to punt on any possible improvements now so closing this PR


-- 
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 a diff in pull request #6230: Alamb/better error message

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


##########
datafusion/core/tests/sqllogictests/test_files/timestamps.slt:
##########
@@ -1031,7 +1031,7 @@ SELECT '2000-01-01T00:00:00'::timestamp - '2010-01-01T00:00:00'::timestamp;
 0 years 0 mons -3653 days 0 hours 0 mins 0.000000000 secs
 
 # Interval - Timestamp => error
-statement error DataFusion error: Error during planning: interval can't subtract timestamp/date
+statement error DataFusion error: Error during planning: Invalid interval subtraction: Interval\(MonthDayNano\) \- Timestamp\(Nanosecond, None\)

Review Comment:
   I would like to hear opinions on this new message. I think it is better but still not great as it has references to the detailed Arrow types.
   
   



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