Allow force casting of comma-separated numbers - #3059
Merged
Yicong-Huang merged 7 commits intoNov 15, 2024
Conversation
Yicong-Huang
requested review from
aglinxinyuan
and removed request for
kunwp1
November 15, 2024 19:41
kunwp1
approved these changes
Nov 15, 2024
kunwp1
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Adding unit tests look good!
We had an internal discussion that for "1 2 3 4 5", we trim the string and just use the first number, so the output is 1 in the current implementation. I think it is okay for now.
Yicong-Huang
deleted the
yicong-allow-force-casting-of-comma-seperated-numbers
branch
November 15, 2024 23:30
Yicong-Huang
added a commit
that referenced
this pull request
Dec 2, 2024
PurelyBlank
pushed a commit
that referenced
this pull request
Dec 4, 2024
The typecasting operator does not work when casting number-strings with commas. This PR adds this functionality. By default, it will infer the comma-separated number-strings as String type to preserve the information. When the user explicitly requests casting such a comma-separated number-string into an Int type or a Long type, it will perform the casting. For instance, now typecasting can cast `1,234` into `1234` as an integer. Added testcases for other types as well.
PurelyBlank
pushed a commit
that referenced
this pull request
Dec 4, 2024
SarahAsad23
pushed a commit
to madisonmlin/texera
that referenced
this pull request
May 20, 2026
The typecasting operator does not work when casting number-strings with commas. This PR adds this functionality. By default, it will infer the comma-separated number-strings as String type to preserve the information. When the user explicitly requests casting such a comma-separated number-string into an Int type or a Long type, it will perform the casting. For instance, now typecasting can cast `1,234` into `1234` as an integer. Added testcases for other types as well.
SarahAsad23
pushed a commit
to madisonmlin/texera
that referenced
this pull request
May 20, 2026
apache#3111 caused changes in apache#3059 being reverted. This PR applies the changes again.
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
The typecasting operator does not work when casting number-strings with commas. This PR adds this functionality. By default, it will infer the comma-separated number-strings as String type to preserve the information. When the user explicitly requests casting such a comma-separated number-string into an Int type or a Long type, it will perform the casting. For instance, now typecasting can cast `1,234` into `1234` as an integer. Added testcases for other types as well.
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
apache#3111 caused changes in apache#3059 being reverted. This PR applies the changes again.
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.
The typecasting operator does not work when casting number-strings with commas. This PR adds this functionality. By default, it will infer the comma-separated number-strings as String type to preserve the information. When the user explicitly requests casting such a comma-separated number-string into an Int type or a Long type, it will perform the casting.
For instance, now typecasting can cast
1,234into1234as an integer.Added testcases for other types as well.