You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Error rather than silently ignore extra parameter passed to ceil/floor (#18265)
## Which issue does this PR close?
<!--
-->
- Closes#18175
## Rationale for this change
<!--
-->
The Ceil/Floor calls via SQL was being parsed such that they were taking
2 arguments instead of 1, the second of which is not currently needed
and the second argument was being ignored and passed silently.
## What changes are included in this PR?
<!--
-->
The second parameter(`field`) which was being passed if is of the
`CeilFloorKind` enum from `sqlparser` crate . Neither of the enum's two
variants (`DateTimeField` and `Scale`)are being implemented hence they
have been ignored with apporpriate error type and only succeeds if the
`DateTimeField` has `NoDateTime` variant i,e it is treated as empty.
## 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)?
-->
All Unit Tests pass successfully.
---------
Co-authored-by: Andrew Lamb <[email protected]>
0 commit comments