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-14426][SQL] Merge PerserUtils and ParseUtils #12199

Closed

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Apr 6, 2016

What changes were proposed in this pull request?

We have ParserUtils and ParseUtils which are both utility collections for use during the parsing process.
Those names and what they are used for is very similar so I think we can merge them.

Also, the original unescapeSQLString method may have a fault. When "\u0061" style character literals are passed to the method, it's not unescaped successfully.
This patch fix the bug.

How was this patch tested?

Added a new test case.

@SparkQA
Copy link

SparkQA commented Apr 6, 2016

Test build #55090 has finished for PR 12199 at commit e54bcc6.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

LGTM

@hvanhovell
Copy link
Contributor

Yay! LGTM.

// scalastyle:on nonascii
}

// TODO: Add test cases for other methods in ParserUtils
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah you have a point there. These methods are all tested indirectly in the *ParserSuite's.

@SparkQA
Copy link

SparkQA commented Apr 6, 2016

Test build #55095 has finished for PR 12199 at commit 0619067.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 6, 2016

Test build #2758 has finished for PR 12199 at commit 0619067.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

int base = i + 2;
for (int j = 0; j < 4; j++) {
int digit = Character.digit(b.charAt(j + base), 16);
code += digit * multiplier[j];
Copy link
Contributor

Choose a reason for hiding this comment

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

@sarutak If understand this correctly they are shifting a hexidecimal value using a decimal multiplier. This would kinda work as long as you pass in decimal unicode literals :s...

Do you think that we should file a bug with the Hive project?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I'm thinking about reporting this issue.

@SparkQA
Copy link

SparkQA commented Apr 6, 2016

Test build #55106 has finished for PR 12199 at commit e28ddd2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

Merging into master thanks.

@asfgit asfgit closed this in 10494fe Apr 6, 2016
@sarutak sarutak deleted the merge-ParseUtils-and-ParserUtils branch April 12, 2016 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants