You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by andrewor14 <gi...@git.apache.org> on 2016/04/28 01:25:11 UTC

[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

GitHub user andrewor14 opened a pull request:

    https://github.com/apache/spark/pull/12746

    [SPARK-14945][PYTHON] SparkSession Python API 

    ## What changes were proposed in this pull request?
    
    `SparkSession` will be the new thing in 2.0. This was added in Scala in #13643. This patch adds an initial API for python.
    
    **Note**: This API is NOT complete in its current state. In particular, for now I left out the `conf` and `catalog` APIs, which were added later in Scala. These will be added later before 2.0.
    
    ## How was this patch tested?
    
    Python tests.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/andrewor14/spark python-spark-session

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/12746.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 #12746
    
----
commit 8370767759b5191098c87271cda60c6dcbe9fc72
Author: Andrew Or <an...@databricks.com>
Date:   2016-04-27T23:21:11Z

    Implement SparkSession + use it in pyspark shell

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215262899
  
    **[Test build #57191 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57191/consoleFull)** for PR 12746 at commit [`8370767`](https://github.com/apache/spark/commit/8370767759b5191098c87271cda60c6dcbe9fc72).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215323954
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215265599
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215323955
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57224/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215334370
  
    **[Test build #57233 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57233/consoleFull)** for PR 12746 at commit [`e61aa8a`](https://github.com/apache/spark/commit/e61aa8a10c5cca0615dea5544f0060781c385f89).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215347510
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57234/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12746#discussion_r62708450
  
    --- Diff: python/pyspark/sql/session.py ---
    @@ -0,0 +1,525 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +from __future__ import print_function
    +import sys
    +import warnings
    +from functools import reduce
    +
    +if sys.version >= '3':
    +    basestring = unicode = str
    +else:
    +    from itertools import imap as map
    +
    +from pyspark import since
    +from pyspark.rdd import RDD, ignore_unicode_prefix
    +from pyspark.sql.dataframe import DataFrame
    +from pyspark.sql.functions import UserDefinedFunction
    +from pyspark.sql.readwriter import DataFrameReader
    +from pyspark.sql.types import Row, DataType, StringType, StructType, _verify_type, \
    +    _infer_schema, _has_nulltype, _merge_type, _create_converter, _parse_datatype_string
    +from pyspark.sql.utils import install_exception_handler
    +
    +__all__ = ["SparkSession"]
    +
    +
    +def _monkey_patch_RDD(sparkSession):
    +    def toDF(self, schema=None, sampleRatio=None):
    --- End diff --
    
    Please do.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215263098
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12746#discussion_r62708520
  
    --- Diff: python/pyspark/sql/session.py ---
    @@ -0,0 +1,525 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +from __future__ import print_function
    +import sys
    +import warnings
    +from functools import reduce
    +
    +if sys.version >= '3':
    +    basestring = unicode = str
    +else:
    +    from itertools import imap as map
    +
    +from pyspark import since
    +from pyspark.rdd import RDD, ignore_unicode_prefix
    +from pyspark.sql.dataframe import DataFrame
    +from pyspark.sql.functions import UserDefinedFunction
    +from pyspark.sql.readwriter import DataFrameReader
    +from pyspark.sql.types import Row, DataType, StringType, StructType, _verify_type, \
    +    _infer_schema, _has_nulltype, _merge_type, _create_converter, _parse_datatype_string
    +from pyspark.sql.utils import install_exception_handler
    +
    +__all__ = ["SparkSession"]
    +
    +
    +def _monkey_patch_RDD(sparkSession):
    +    def toDF(self, schema=None, sampleRatio=None):
    --- End diff --
    
    ah it would break APIs - maybe it's not worth it at this point.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215347337
  
    **[Test build #57234 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57234/consoleFull)** for PR 12746 at commit [`e61aa8a`](https://github.com/apache/spark/commit/e61aa8a10c5cca0615dea5544f0060781c385f89).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by nchammas <gi...@git.apache.org>.
Github user nchammas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12746#discussion_r62710390
  
    --- Diff: python/pyspark/sql/session.py ---
    @@ -0,0 +1,525 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +from __future__ import print_function
    +import sys
    +import warnings
    +from functools import reduce
    +
    +if sys.version >= '3':
    +    basestring = unicode = str
    +else:
    +    from itertools import imap as map
    +
    +from pyspark import since
    +from pyspark.rdd import RDD, ignore_unicode_prefix
    +from pyspark.sql.dataframe import DataFrame
    +from pyspark.sql.functions import UserDefinedFunction
    +from pyspark.sql.readwriter import DataFrameReader
    +from pyspark.sql.types import Row, DataType, StringType, StructType, _verify_type, \
    +    _infer_schema, _has_nulltype, _merge_type, _create_converter, _parse_datatype_string
    +from pyspark.sql.utils import install_exception_handler
    +
    +__all__ = ["SparkSession"]
    +
    +
    +def _monkey_patch_RDD(sparkSession):
    +    def toDF(self, schema=None, sampleRatio=None):
    --- End diff --
    
    Either way I guess this is not a big deal really.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215333563
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215263745
  
    **[Test build #57192 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57192/consoleFull)** for PR 12746 at commit [`d6abed1`](https://github.com/apache/spark/commit/d6abed1ba9ec956f0cd3bb063622f783cf1f9825).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215263093
  
    **[Test build #57191 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57191/consoleFull)** for PR 12746 at commit [`8370767`](https://github.com/apache/spark/commit/8370767759b5191098c87271cda60c6dcbe9fc72).
     * This patch **fails Python style tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `class SparkSession(object):`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215510199
  
    Merging in master to unblock Andrew's follow-up pr. @davies can you do some posthoc review on this?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by davies <gi...@git.apache.org>.
Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12746#discussion_r61476916
  
    --- Diff: python/pyspark/shell.py ---
    @@ -61,7 +62,7 @@
         platform.python_version(),
         platform.python_build()[0],
         platform.python_build()[1]))
    -print("SparkContext available as sc, %s available as sqlContext." % sqlContext.__class__.__name__)
    +print("SparkSession available as 'spark'.")
    --- End diff --
    
    Should we mention that how to get a SparkContext from SparkSession?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215333558
  
    **[Test build #57232 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57232/consoleFull)** for PR 12746 at commit [`c4e48dc`](https://github.com/apache/spark/commit/c4e48dc2112011893d345824f2c88c97b7c5caef).
     * This patch **fails Python style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12746#discussion_r62710315
  
    --- Diff: python/pyspark/sql/session.py ---
    @@ -0,0 +1,525 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +from __future__ import print_function
    +import sys
    +import warnings
    +from functools import reduce
    +
    +if sys.version >= '3':
    +    basestring = unicode = str
    +else:
    +    from itertools import imap as map
    +
    +from pyspark import since
    +from pyspark.rdd import RDD, ignore_unicode_prefix
    +from pyspark.sql.dataframe import DataFrame
    +from pyspark.sql.functions import UserDefinedFunction
    +from pyspark.sql.readwriter import DataFrameReader
    +from pyspark.sql.types import Row, DataType, StringType, StructType, _verify_type, \
    +    _infer_schema, _has_nulltype, _merge_type, _create_converter, _parse_datatype_string
    +from pyspark.sql.utils import install_exception_handler
    +
    +__all__ = ["SparkSession"]
    +
    +
    +def _monkey_patch_RDD(sparkSession):
    +    def toDF(self, schema=None, sampleRatio=None):
    --- End diff --
    
    monkey patch is not public, but the method being added via monkey patch becomes public (rdd.toDF)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/12746


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215333433
  
    **[Test build #57232 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57232/consoleFull)** for PR 12746 at commit [`c4e48dc`](https://github.com/apache/spark/commit/c4e48dc2112011893d345824f2c88c97b7c5caef).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215366426
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57233/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215333565
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57232/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215323935
  
    **[Test build #57224 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57224/consoleFull)** for PR 12746 at commit [`2c0ea42`](https://github.com/apache/spark/commit/2c0ea4261d3c1963e76d7de57b19d1f8e18b97f0).
     * This patch **fails PySpark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215366183
  
    **[Test build #57233 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57233/consoleFull)** for PR 12746 at commit [`e61aa8a`](https://github.com/apache/spark/commit/e61aa8a10c5cca0615dea5544f0060781c385f89).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by nchammas <gi...@git.apache.org>.
Github user nchammas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12746#discussion_r62709998
  
    --- Diff: python/pyspark/sql/session.py ---
    @@ -0,0 +1,525 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +from __future__ import print_function
    +import sys
    +import warnings
    +from functools import reduce
    +
    +if sys.version >= '3':
    +    basestring = unicode = str
    +else:
    +    from itertools import imap as map
    +
    +from pyspark import since
    +from pyspark.rdd import RDD, ignore_unicode_prefix
    +from pyspark.sql.dataframe import DataFrame
    +from pyspark.sql.functions import UserDefinedFunction
    +from pyspark.sql.readwriter import DataFrameReader
    +from pyspark.sql.types import Row, DataType, StringType, StructType, _verify_type, \
    +    _infer_schema, _has_nulltype, _merge_type, _create_converter, _parse_datatype_string
    +from pyspark.sql.utils import install_exception_handler
    +
    +__all__ = ["SparkSession"]
    +
    +
    +def _monkey_patch_RDD(sparkSession):
    +    def toDF(self, schema=None, sampleRatio=None):
    --- End diff --
    
    Oh, it looks like a "non-public" method (which is implied in Python by the leading underscore in `_monkey_patch_RDD`) so I thought it would be OK to change.
    
    Are you sure this counts as an API break? I did a search for `_monkey_patch_RDD` and, unless users are meant to use this directly, it looks like an internal-only method.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215366419
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215263100
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57191/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215265601
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57192/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215340073
  
    retest this please?? Why did you run all the unit tests??


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215265576
  
    **[Test build #57192 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57192/consoleFull)** for PR 12746 at commit [`d6abed1`](https://github.com/apache/spark/commit/d6abed1ba9ec956f0cd3bb063622f783cf1f9825).
     * This patch **fails PySpark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by davies <gi...@git.apache.org>.
Github user davies commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215523928
  
    LGTM


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215340310
  
    **[Test build #57234 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57234/consoleFull)** for PR 12746 at commit [`e61aa8a`](https://github.com/apache/spark/commit/e61aa8a10c5cca0615dea5544f0060781c385f89).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by nchammas <gi...@git.apache.org>.
Github user nchammas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12746#discussion_r62704834
  
    --- Diff: python/pyspark/sql/session.py ---
    @@ -0,0 +1,525 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +from __future__ import print_function
    +import sys
    +import warnings
    +from functools import reduce
    +
    +if sys.version >= '3':
    +    basestring = unicode = str
    +else:
    +    from itertools import imap as map
    +
    +from pyspark import since
    +from pyspark.rdd import RDD, ignore_unicode_prefix
    +from pyspark.sql.dataframe import DataFrame
    +from pyspark.sql.functions import UserDefinedFunction
    +from pyspark.sql.readwriter import DataFrameReader
    +from pyspark.sql.types import Row, DataType, StringType, StructType, _verify_type, \
    +    _infer_schema, _has_nulltype, _merge_type, _create_converter, _parse_datatype_string
    +from pyspark.sql.utils import install_exception_handler
    +
    +__all__ = ["SparkSession"]
    +
    +
    +def _monkey_patch_RDD(sparkSession):
    +    def toDF(self, schema=None, sampleRatio=None):
    --- End diff --
    
    Technically not your change @andrewor14 (I see you just moved this line), but it's `samplingRatio` everywhere else in the code. See: [samplingRatio](https://github.com/apache/spark/search?utf8=%E2%9C%93&q=samplingratio&type=Code) vs. [sampleRatio](https://github.com/apache/spark/search?utf8=%E2%9C%93&q=sampleratio&type=Code)
    
    Should I open a PR to fix this?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215320663
  
    **[Test build #57224 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57224/consoleFull)** for PR 12746 at commit [`2c0ea42`](https://github.com/apache/spark/commit/2c0ea4261d3c1963e76d7de57b19d1f8e18b97f0).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12746#issuecomment-215347507
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14945][PYTHON] SparkSession Python API

Posted by nchammas <gi...@git.apache.org>.
Github user nchammas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12746#discussion_r62710740
  
    --- Diff: python/pyspark/sql/session.py ---
    @@ -0,0 +1,525 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +from __future__ import print_function
    +import sys
    +import warnings
    +from functools import reduce
    +
    +if sys.version >= '3':
    +    basestring = unicode = str
    +else:
    +    from itertools import imap as map
    +
    +from pyspark import since
    +from pyspark.rdd import RDD, ignore_unicode_prefix
    +from pyspark.sql.dataframe import DataFrame
    +from pyspark.sql.functions import UserDefinedFunction
    +from pyspark.sql.readwriter import DataFrameReader
    +from pyspark.sql.types import Row, DataType, StringType, StructType, _verify_type, \
    +    _infer_schema, _has_nulltype, _merge_type, _create_converter, _parse_datatype_string
    +from pyspark.sql.utils import install_exception_handler
    +
    +__all__ = ["SparkSession"]
    +
    +
    +def _monkey_patch_RDD(sparkSession):
    +    def toDF(self, schema=None, sampleRatio=None):
    --- End diff --
    
    Ahhhhh... OK I get it now.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org