Skip to content

Commit

Permalink
test case for special character
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Kao <[email protected]>
  • Loading branch information
seankao-az committed Mar 23, 2024
1 parent fadff6c commit c5c15e3
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,12 @@ public void testBuildQueryStringNestedQuote() {
String params = SparkSubmitParameters.Builder.builder().query(rawQuery).build().toString();
assertTrue(params.contains(expectedQueryInParams));
}

@Test
public void testBuildQueryStringSpecialCharacter() {
String rawQuery = "SELECT '{\"test ,:+\\\"inner\\\"/\\|?#><\"}'";
String expectedQueryInParams = "SELECT '{\\\"test ,:+\\\\\\\"inner\\\\\\\"/\\\\|?#><\\\"}'";
String params = SparkSubmitParameters.Builder.builder().query(rawQuery).build().toString();
assertTrue(params.contains(expectedQueryInParams));
}
}

0 comments on commit c5c15e3

Please sign in to comment.