You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by DylanGuedes <gi...@git.apache.org> on 2018/03/08 19:46:59 UTC
[GitHub] spark pull request #20775: Changes input variable to not conflict with built...
GitHub user DylanGuedes opened a pull request:
https://github.com/apache/spark/pull/20775
Changes input variable to not conflict with built-in function
Signed-off-by: DylanGuedes <dj...@gmail.com>
## What changes were proposed in this pull request?
Changes variable name conflict: [input is a built-in python function](https://stackoverflow.com/questions/20670732/is-input-a-keyword-in-python).
## How was this patch tested?
I runned the example and it works fine.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/DylanGuedes/spark input_variable
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/20775.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 #20775
----
commit 4685d68f230fa166044303ca499d9513eb2bab57
Author: DylanGuedes <dj...@...>
Date: 2018-03-06T14:01:19Z
Changes input variable to not conflict with reserved word
Signed-off-by: DylanGuedes <dj...@gmail.com>
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20775
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #20775: [PYTHON] Changes input variable to not conflict w...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/20775
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20775
**[Test build #88124 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88124/testReport)** for PR 20775 at commit [`4685d68`](https://github.com/apache/spark/commit/4685d68f230fa166044303ca499d9513eb2bab57).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20775
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20775
**[Test build #88125 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88125/testReport)** for PR 20775 at commit [`2cb9b57`](https://github.com/apache/spark/commit/2cb9b570c4057add5cd1ce4492a0db3bd70d8e8c).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20775
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88124/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:
https://github.com/apache/spark/pull/20775
ok to test
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #20775: Changes input variable to not conflict with built...
Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/20775#discussion_r173446568
--- Diff: examples/src/main/python/ml/dataframe_example.py ---
@@ -35,18 +35,18 @@
print("Usage: dataframe_example.py <libsvm file>", file=sys.stderr)
sys.exit(-1)
elif len(sys.argv) == 2:
- input = sys.argv[1]
+ input_path = sys.argv[1]
else:
- input = "data/mllib/sample_libsvm_data.txt"
+ input_path = "data/mllib/sample_libsvm_data.txt"
spark = SparkSession \
.builder \
.appName("DataFrameExample") \
.getOrCreate()
- # Load input data
- print("Loading LIBSVM file with UDT from " + input + ".")
- df = spark.read.format("libsvm").load(input).cache()
+ # Load file from path
--- End diff --
Let's just write it as `Load an input file`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20775
**[Test build #88124 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88124/testReport)** for PR 20775 at commit [`4685d68`](https://github.com/apache/spark/commit/4685d68f230fa166044303ca499d9513eb2bab57).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20775
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88128/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by DylanGuedes <gi...@git.apache.org>.
Github user DylanGuedes commented on the issue:
https://github.com/apache/spark/pull/20775
@HyukjinKwon I checked every other built in function and this was the only one being used. What you think?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #20775: Changes input variable to not conflict with built...
Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/20775#discussion_r173436070
--- Diff: examples/src/main/python/ml/dataframe_example.py ---
@@ -17,7 +17,7 @@
"""
An example of how to use DataFrame for ML. Run with::
- bin/spark-submit examples/src/main/python/ml/dataframe_example.py <input>
+ bin/spark-submit examples/src/main/python/ml/dataframe_example.py <dataset>
--- End diff --
Shall we change `dataset` to like .. `input_path` or `path`? I think the name `dataset` is usually used for `Dataset` instance.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20775
**[Test build #88128 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88128/testReport)** for PR 20775 at commit [`ae97ceb`](https://github.com/apache/spark/commit/ae97cebfaf44c60b92285351f2bc83f80c19633a).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20775
Can one of the admins verify this patch?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20775
**[Test build #88125 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88125/testReport)** for PR 20775 at commit [`2cb9b57`](https://github.com/apache/spark/commit/2cb9b570c4057add5cd1ce4492a0db3bd70d8e8c).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:
https://github.com/apache/spark/pull/20775
I think it's fine. It should better avoid shadowing builtin names but can you check out other examples too while we are here?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20775
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88125/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: [PYTHON] Changes input variable to not conflict with bui...
Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:
https://github.com/apache/spark/pull/20775
Merged to master and branch-2.3.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #20775: Changes input variable to not conflict with built...
Posted by DylanGuedes <gi...@git.apache.org>.
Github user DylanGuedes commented on a diff in the pull request:
https://github.com/apache/spark/pull/20775#discussion_r173446874
--- Diff: examples/src/main/python/ml/dataframe_example.py ---
@@ -35,18 +35,18 @@
print("Usage: dataframe_example.py <libsvm file>", file=sys.stderr)
sys.exit(-1)
elif len(sys.argv) == 2:
- input = sys.argv[1]
+ input_path = sys.argv[1]
else:
- input = "data/mllib/sample_libsvm_data.txt"
+ input_path = "data/mllib/sample_libsvm_data.txt"
spark = SparkSession \
.builder \
.appName("DataFrameExample") \
.getOrCreate()
- # Load input data
- print("Loading LIBSVM file with UDT from " + input + ".")
- df = spark.read.format("libsvm").load(input).cache()
+ # Load file from path
--- End diff --
Done.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20775
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by DylanGuedes <gi...@git.apache.org>.
Github user DylanGuedes commented on the issue:
https://github.com/apache/spark/pull/20775
Sure, and thanks for the review! I used the "dataset" name because I checked a few examples that also use it, but I'll rename to path then. I already checked all other examples using grep and this is the only one using "input" name.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20775
Can one of the admins verify this patch?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: [PYTHON] Changes input variable to not conflict with bui...
Posted by DylanGuedes <gi...@git.apache.org>.
Github user DylanGuedes commented on the issue:
https://github.com/apache/spark/pull/20775
Sure. Done.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20775: Changes input variable to not conflict with built-in fun...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20775
**[Test build #88128 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88128/testReport)** for PR 20775 at commit [`ae97ceb`](https://github.com/apache/spark/commit/ae97cebfaf44c60b92285351f2bc83f80c19633a).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org