Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-46542][SQL] Remove the check for c>=0 from ExternalCatalogUtils#needsEscaping as it is always true #44533

Closed
wants to merge 2 commits into from

Conversation

LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Dec 29, 2023

What changes were proposed in this pull request?

This pr just remove the check for c>=0 from ExternalCatalogUtils#needsEscaping since it is always true due to the numerical range of the Char type in Scala is unsigned integer.

scala> Char.char2long(Char.MinValue)
res2: Long = 0

scala> Char.char2long(Char.MaxValue)
res1: Long = 65535

Why are the changes needed?

Remove constant condition

Does this PR introduce any user-facing change?

No

How was this patch tested?

Pass GitHub Actions

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label Dec 29, 2023
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

@dongjoon-hyun
Copy link
Member

Merged to master. Thank you, @LuciferYang .

@LuciferYang
Copy link
Contributor Author

Thanks @dongjoon-hyun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants