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

HIVE-27488: HPL/SQL Quote literals not behaving as expected #4476

Closed
wants to merge 3 commits into from

Conversation

mdayakar
Copy link
Contributor

What changes were proposed in this pull request?

Now including single quote(') in the output if the last two characters are single quotes(').

Why are the changes needed?

To fix the issue 'HIVE-27488: HPL/SQL Quote literals not behaving as expected'.

Does this PR introduce any user-facing change?

No

Is the change a dependency upgrade?

No

How was this patch tested?

Tests are added.

Copy link

@aturoczy aturoczy left a comment

Choose a reason for hiding this comment

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

+1

hplsql/src/test/queries/local/dbms_output.sql Outdated Show resolved Hide resolved
itests/hive-unit/pom.xml Outdated Show resolved Hide resolved
hplsql/src/main/java/org/apache/hive/hplsql/Utils.java Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Jul 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@zabetak zabetak left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for addressing the review comments. Some very minor stuff that I will fix during merge.

public class TestUtils {

@Test
public void testShouldRemoveEscapeCharactersFromTheGivenInput() {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should include the name of the method that is tested. Something like:
testUnquoteStringRemovesOneQuoteWhenTwoConsecutive

@zabetak zabetak closed this in 7139d42 Jul 19, 2023
yeahyung pushed a commit to yeahyung/hive that referenced this pull request Jul 20, 2023
… M reviewed by Attila Turoczy, Stamatis Zampetakis)

Closes apache#4476
tarak271 pushed a commit to tarak271/hive-1 that referenced this pull request Dec 19, 2023
… M reviewed by Attila Turoczy, Stamatis Zampetakis)

Closes apache#4476
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants