Skip to content

Scala to Python - sparkSql folder #2

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

Merged
merged 6 commits into from
Sep 30, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Small change to regex on commons/Utils.py | Removed commons/Utils.scala
  • Loading branch information
Pedro Bernardo committed Sep 30, 2017
commit 25927aeaba02e6106019dd4d15d48540f8c5e7e5
4 changes: 2 additions & 2 deletions commons/Utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re

class Utils():
COMMA_DELIMITER = re.compile(''',(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''')
Copy link
Owner

@jleetutorial jleetutorial Sep 30, 2017

Choose a reason for hiding this comment

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

why do we need to make this small change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I made some changes to the original one in scala to run in python (because the languages parse regex in a different way), and among those changes I, mistakenly, made the new one not match commas within single quotations too. But this raised some problems when processing the stackoverflow survey. I just removed that.


COMMA_DELIMITER = re.compile(''',(?=(?:[^"]*"[^"]*")*[^"]*$)''')
6 changes: 0 additions & 6 deletions commons/Utils.scala

This file was deleted.