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

Escape backslashes in queries passed to UNLOAD #228

Closed
wants to merge 2 commits into from

Conversation

JoshRosen
Copy link
Contributor

@JoshRosen JoshRosen commented Jul 7, 2016

We need to escape backslashes that appear in the query passed to the UNLOAD command. This patch adds a regression test plus additional backslash escaping. Fixes #215.

@JoshRosen JoshRosen added the bug label Jul 7, 2016
@JoshRosen JoshRosen added this to the 0.6.1 milestone Jul 7, 2016
@@ -182,10 +182,10 @@ class RedshiftSourceSuite
|UNLOAD \('SELECT "testbyte", "testbool" FROM
| \(select testbyte, testbool
| from test_table
| where teststring = \\'Unicode\\'\\'s樂趣\\'\) '\)
| where teststring = \\'\\\\\\\\Unicode\\'\\'s樂趣\\'\) '\)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that in this unit test this line is a regex matching expected output, hence the extra level of backslash escaping.

@JoshRosen JoshRosen closed this Jul 7, 2016
@JoshRosen JoshRosen reopened this Jul 7, 2016
@codecov-io
Copy link

codecov-io commented Jul 8, 2016

Current coverage is 89.95%

Merging #228 into master will increase coverage by 0.14%

@@             master       #228   diff @@
==========================================
  Files            13         13          
  Lines           697        697          
  Methods         611        611          
  Messages          0          0          
  Branches         86         86          
==========================================
+ Hits            626        627     +1   
+ Misses           71         70     -1   
  Partials          0          0          

Powered by Codecov. Last updated by ffdcf95...aa5004b

@JoshRosen
Copy link
Contributor Author

Going to merge this fix.

@JoshRosen JoshRosen closed this in 127e5fc Jul 8, 2016
@JoshRosen JoshRosen deleted the unload-backslash-escape branch July 8, 2016 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants