Skip to content

Commit 9d73d09

Browse files
authored
chore: re-enable add_months overflow test (#21774)
## 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. --> - From this discussion: #19711 (comment) ## 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. --> In above PR we didn't enable a test because upstream arrow-rs had a panic bug. This is now fixed: - apache/arrow-rs#9144 So now we can enable this test again to assert expected error. ## 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. -->
1 parent 95157ef commit 9d73d09

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

datafusion/sqllogictest/test_files/spark/datetime/add_months.slt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ SELECT add_months('2016-07-30'::date, 10000::int);
3131
2849-11-30
3232

3333
# Test integer overflow
34-
# TODO: Enable with next arrow upgrade (>=58.0.0)
35-
# query D
36-
# SELECT add_months('2016-07-30'::date, 2147483647::int);
37-
# ----
38-
# NULL
34+
query error DataFusion error: Arrow error: Compute error: Date arithmetic overflow: 17012 \+ 2147483647 months
35+
SELECT add_months('2016-07-30'::date, 2147483647::int);
3936

4037
query D
4138
SELECT add_months('2016-07-30'::date, -5::int);

0 commit comments

Comments
 (0)