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

Conversation

zenglinxi0615
Copy link

What changes were proposed in this pull request?

make spark sql compatible with hive sql that using python script transform like using 'xxx.py'

How was this patch tested?

manual tests

… python script transform like using 'xxx.py'
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

// 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.

@zenglinxi0615
Copy link
Author

Have you tried it on spark 1.6.2?

@yongliangliu
Copy link

yongliangliu commented Aug 19, 2016

I know how to deal with it.
i used the fllow code like this

add file /temp/test.py;
select transform(var1) using '/temp/test.py' as (var1_new)  from test_table;

the error is "Error: /bin/bash: test.py: command not found"
but when i use this and do not change the source code ,it's work,i was so stupid.

add file /temp/test.py;
select transform(var1) using 'python /temp/test.py' as (var1_new)  from test_table;

so there is not bug and no need to change source code

@zenglinxi0615
Copy link
Author

zenglinxi0615 commented Sep 1, 2016

sorry for long time no response.
yes, you are right, when you can change the sql from using '/temp/test.py' to using 'python /temp/test.py', there's no need for changing the spark source code.
However, this patch is used for the case when there are already many hive sql which using '/temp/test.py', it cost too much time for modifing these hive sql, so we want to make spark sql compatible with hive sql that using python script transform like using 'xxx.py'.

@HyukjinKwon
Copy link
Member

@zenglinxi0615 Is it still active? I wonder if there is any argument against #14686 (comment). Otherwise, I would rather like to suggest to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants