Add cast functions for char datatype to numeric types#23792
Merged
tdcmeehan merged 1 commit intoprestodb:masterfrom Oct 10, 2024
Merged
Add cast functions for char datatype to numeric types#23792tdcmeehan merged 1 commit intoprestodb:masterfrom
tdcmeehan merged 1 commit intoprestodb:masterfrom
Conversation
tdcmeehan
reviewed
Oct 9, 2024
| } | ||
|
|
||
| @Test | ||
| public void testCharCast() |
Contributor
There was a problem hiding this comment.
Can you add some test cases for the following:
- some numbers without whitespace
- What happens when the number is outside of the range of values for integer/float
- Any support for nan or infinity
- any support for hexidecimal numbers
- Any support for hexidecimal floating point numbers
Contributor
Author
There was a problem hiding this comment.
Added some more tests. There is no support for hexa decimal numbers now.
Contributor
Author
There was a problem hiding this comment.
We could probably add support for hexadecimals by considering any char(x) type prefixed with 0x as a hexadecimal, but I'm not sure if that will be an unintended output for those who use the cast function
Contributor
|
Nit to include the PR number in the release note entry, following the Release Notes Guidelines. |
5d20de0 to
008cc08
Compare
008cc08 to
8d8464a
Compare
tdcmeehan
approved these changes
Oct 9, 2024
25 tasks
Contributor
|
Saved that user @elbinpallimalilibm is from IBM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add CAST functions for CHAR datatype to different numeric datatypes.
Motivation and Context
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.