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-16253][SQL] make spark sql compatible with hive sql that using… #14686

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ case class ScriptTransformation(
val cmd = List("/bin/bash", "-c", script)
val builder = new ProcessBuilder(cmd.asJava)

// for compatibility with hive
// if the script is a python/bash/... file, we should make it executable
if (new File(script).exists) {
new File(script).setExecutable(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this create a huge security hole? Especially because we are not resetting this to its old state.

val env = builder.environment()
env.put("PATH", env.get("PATH") + ":.")
}

val proc = builder.start()
val inputStream = proc.getInputStream
val outputStream = proc.getOutputStream
Expand Down