GitHub user JoshRosen opened a pull request:
https://github.com/apache/spark/pull/15156
[SPARK-17160] Properly escape field names in code generation error messages
This patch addresses a corner-case escaping bug where field names which
contain special characters were unsafely interpolated into error message string
literals in generated Java code, leading to compilation errors.
This patch addresses these issues by using `addReferenceObj` to store the
error messages as string fields rather than inline string constants.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/JoshRosen/spark SPARK-17160
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15156.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #15156
commit 512c114ec6198e67cfb168e35906a53f6b0b425c
Author: Josh Rosen
Date: 2016-09-19T21:15:49Z
Add regression test for SPARK-17160
commit 39eeed4a33e935b30662bdd6f8b366b88f270db9
Author: Josh Rosen
Date: 2016-09-19T21:16:08Z
Fix SPARK-17160 via additional escaping.
commit 1430068f7b1f361a09fc0f18fd7e996f797f7c47
Author: Josh Rosen
Date: 2016-09-19T22:05:20Z
Add regression test for similar bug in AssertTrue
commit 39e2e026de5b913f2d50869f68ff3d8fe80a8367
Author: Josh Rosen
Date: 2016-09-19T22:14:14Z
Fix using codegen context references.
commit 453470527d065ad6895cd728bfbc0eec6928bf36
Author: Josh Rosen
Date: 2016-09-19T22:18:47Z
Similar fix in PrintToStderr
commit 17a9fced0409d18df371256b6dabe0493e501d85
Author: Josh Rosen
Date: 2016-09-19T22:22:01Z
Use same fix for GetExternalRowField
commit 35b62d590e8995aa08b8c494d104ba6ff5f6e801
Author: Josh Rosen
Date: 2016-09-19T22:26:24Z
Similar change in ValidateExternalType
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---
-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org