Skip to content
Snippets Groups Projects
  1. Jul 16, 2016
    • Narine Kokhlikyan's avatar
      [SPARK-16112][SPARKR] Programming guide for gapply/gapplyCollect · 41673048
      Narine Kokhlikyan authored
      ## What changes were proposed in this pull request?
      
      Updates programming guide for spark.gapply/spark.gapplyCollect.
      
      Similar to other examples I used `faithful` dataset to demonstrate gapply's functionality.
      Please, let me know if you prefer another example.
      
      ## How was this patch tested?
      Existing test cases in R
      
      Author: Narine Kokhlikyan <narine@slice.com>
      
      Closes #14090 from NarineK/gapplyProgGuide.
      41673048
    • Sean Owen's avatar
      [SPARK-3359][DOCS] More changes to resolve javadoc 8 errors that will help... · 5ec0d692
      Sean Owen authored
      [SPARK-3359][DOCS] More changes to resolve javadoc 8 errors that will help unidoc/genjavadoc compatibility
      
      ## What changes were proposed in this pull request?
      
      These are yet more changes that resolve problems with unidoc/genjavadoc and Java 8. It does not fully resolve the problem, but gets rid of as many errors as we can from this end.
      
      ## How was this patch tested?
      
      Jenkins build of docs
      
      Author: Sean Owen <sowen@cloudera.com>
      
      Closes #14221 from srowen/SPARK-3359.3.
      5ec0d692
    • Sameer Agarwal's avatar
      [SPARK-16582][SQL] Explicitly define isNull = false for non-nullable expressions · a1ffbada
      Sameer Agarwal authored
      ## What changes were proposed in this pull request?
      
      This patch is just a slightly safer way to fix the issue we encountered in https://github.com/apache/spark/pull/14168 should this pattern re-occur at other places in the code.
      
      ## How was this patch tested?
      
      Existing tests. Also, I manually tested that it fixes the problem in SPARK-16514 without having the proposed change in https://github.com/apache/spark/pull/14168
      
      Author: Sameer Agarwal <sameerag@cs.berkeley.edu>
      
      Closes #14227 from sameeragarwal/codegen.
      a1ffbada
  2. Jul 15, 2016
    • Tejas Patil's avatar
      [SPARK-16230][CORE] CoarseGrainedExecutorBackend to self kill if there is an... · b2f24f94
      Tejas Patil authored
      [SPARK-16230][CORE] CoarseGrainedExecutorBackend to self kill if there is an exception while creating an Executor
      
      ## What changes were proposed in this pull request?
      
      With the fix from SPARK-13112, I see that `LaunchTask` is always processed after `RegisteredExecutor` is done and so it gets chance to do all retries to startup an executor. There is still a problem that if `Executor` creation itself fails and there is some exception, it gets unnoticed and the executor is killed when it tries to process the `LaunchTask` as `executor` is null : https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala#L88 So if one looks at the logs, it does not tell that there was problem during `Executor` creation and thats why it was killed.
      
      This PR explicitly catches exception in `Executor` creation, logs a proper message and then exits the JVM. Also, I have changed the `exitExecutor` method to accept `reason` so that backends can use that reason and do stuff like logging to a DB to get an aggregate of such exits at a cluster level
      
      ## How was this patch tested?
      
      I am relying on existing tests
      
      Author: Tejas Patil <tejasp@fb.com>
      
      Closes #14202 from tejasapatil/exit_executor_failure.
      b2f24f94
    • Felix Cheung's avatar
      [SPARK-16538][SPARKR] Add more tests for namespace call to SparkSession functions · 611a8ca5
      Felix Cheung authored
      ## What changes were proposed in this pull request?
      
      More tests
      I don't think this is critical for Spark 2.0.0 RC, maybe Spark 2.0.1 or 2.1.0.
      
      ## How was this patch tested?
      
      unit tests
      
      shivaram dongjoon-hyun
      
      Author: Felix Cheung <felixcheung_m@hotmail.com>
      
      Closes #14206 from felixcheung/rroutetests.
      611a8ca5
    • Joseph K. Bradley's avatar
      [SPARK-14817][ML][MLLIB][DOC] Made DataFrame-based API primary in MLlib guide · 5ffd5d38
      Joseph K. Bradley authored
      ## What changes were proposed in this pull request?
      
      Made DataFrame-based API primary
      * Spark doc menu bar and other places now link to ml-guide.html, not mllib-guide.html
      * mllib-guide.html keeps RDD-specific list of features, with a link at the top redirecting people to ml-guide.html
      * ml-guide.html includes a "maintenance mode" announcement about the RDD-based API
        * **Reviewers: please check this carefully**
      * (minor) Titles for DF API no longer include "- spark.ml" suffix.  Titles for RDD API have "- RDD-based API" suffix
      * Moved migration guide to ml-guide from mllib-guide
        * Also moved past guides from mllib-migration-guides to ml-migration-guides, with a redirect link on mllib-migration-guides
        * **Reviewers**: I did not change any of the content of the migration guides.
      
      Reorganized DataFrame-based guide:
      * ml-guide.html mimics the old mllib-guide.html page in terms of content: overview, migration guide, etc.
      * Moved Pipeline description into ml-pipeline.html and moved tuning into ml-tuning.html
        * **Reviewers**: I did not change the content of these guides, except some intro text.
      * Sidebar remains the same, but with pipeline and tuning sections added
      
      Other:
      * ml-classification-regression.html: Moved text about linear methods to new section in page
      
      ## How was this patch tested?
      
      Generated docs locally
      
      Author: Joseph K. Bradley <joseph@databricks.com>
      
      Closes #14213 from jkbradley/ml-guide-2.0.
      5ffd5d38
    • z001qdp's avatar
      [SPARK-16426][MLLIB] Fix bug that caused NaNs in IsotonicRegression · 71ad945b
      z001qdp authored
      ## What changes were proposed in this pull request?
      
      Fixed a bug that caused `NaN`s in `IsotonicRegression`. The problem occurs when training rows with the same feature value but different labels end up on different partitions. This patch changes a `sortBy` call to a `partitionBy(RangePartitioner)` followed by a `mapPartitions(sortBy)` in order to ensure that all rows with the same feature value end up on the same partition.
      
      ## How was this patch tested?
      
      Added a unit test.
      
      Author: z001qdp <Nicholas.Eggert@target.com>
      
      Closes #14140 from neggert/SPARK-16426-isotonic-nan.
      71ad945b
    • WeichenXu's avatar
      [SPARK-16546][SQL][PYSPARK] update python dataframe.drop · 18324238
      WeichenXu authored
      ## What changes were proposed in this pull request?
      
      Make `dataframe.drop` API in python support multi-columns parameters,
      so that it is the same with scala API.
      
      ## How was this patch tested?
      
      The doc test.
      
      Author: WeichenXu <WeichenXu123@outlook.com>
      
      Closes #14203 from WeichenXu123/drop_python_api.
      18324238
  3. Jul 14, 2016
    • Reynold Xin's avatar
      [SPARK-16557][SQL] Remove stale doc in sql/README.md · 2e4075e2
      Reynold Xin authored
      ## What changes were proposed in this pull request?
      Most of the documentation in https://github.com/apache/spark/blob/master/sql/README.md is stale. It would be useful to keep the list of projects to explain what's going on, and everything else should be removed.
      
      ## How was this patch tested?
      N/A
      
      Author: Reynold Xin <rxin@databricks.com>
      
      Closes #14211 from rxin/SPARK-16557.
      2e4075e2
    • Josh Rosen's avatar
      [SPARK-16555] Work around Jekyll error-handling bug which led to silent failures · 972673ac
      Josh Rosen authored
      If a custom Jekyll template tag throws Ruby's equivalent of a "file not found" exception, then Jekyll will stop the doc building process but will exit with a successful status, causing our doc publishing jobs to silently fail.
      
      This is caused by https://github.com/jekyll/jekyll/issues/5104, a case of bad error-handling logic in Jekyll. This patch works around this by updating our `include_example.rb` plugin to catch the exception and exit rather than allowing it to bubble up and be ignored by Jekyll.
      
      I tested this manually with
      
      ```
      rm ./examples/src/main/scala/org/apache/spark/examples/sql/SparkSQLExample.scala
      cd docs
      SKIP_API=1 jekyll build
      echo $?
      ```
      
      Author: Josh Rosen <joshrosen@databricks.com>
      
      Closes #14209 from JoshRosen/fix-doc-building.
      972673ac
    • Shivaram Venkataraman's avatar
      [SPARK-16553][DOCS] Fix SQL example file name in docs · 01c4c1fa
      Shivaram Venkataraman authored
      ## What changes were proposed in this pull request?
      
      Fixes a typo in the sql programming guide
      
      ## How was this patch tested?
      
      Building docs locally
      
      (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
      
      Author: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
      
      Closes #14208 from shivaram/spark-sql-doc-fix.
      01c4c1fa
    • jerryshao's avatar
      [SPARK-16540][YARN][CORE] Avoid adding jars twice for Spark running on yarn · 91575cac
      jerryshao authored
      ## What changes were proposed in this pull request?
      
      Currently when running spark on yarn, jars specified with --jars, --packages will be added twice, one is Spark's own file server, another is yarn's distributed cache, this can be seen from log:
      for example:
      
      ```
      ./bin/spark-shell --master yarn-client --jars examples/target/scala-2.11/jars/scopt_2.11-3.3.0.jar
      ```
      
      If specified the jar to be added is scopt jar, it will added twice:
      
      ```
      ...
      16/07/14 15:06:48 INFO Server: Started 5603ms
      16/07/14 15:06:48 INFO Utils: Successfully started service 'SparkUI' on port 4040.
      16/07/14 15:06:48 INFO SparkUI: Bound SparkUI to 0.0.0.0, and started at http://192.168.0.102:4040
      16/07/14 15:06:48 INFO SparkContext: Added JAR file:/Users/sshao/projects/apache-spark/examples/target/scala-2.11/jars/scopt_2.11-3.3.0.jar at spark://192.168.0.102:63996/jars/scopt_2.11-3.3.0.jar with timestamp 1468480008637
      16/07/14 15:06:49 INFO RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
      16/07/14 15:06:49 INFO Client: Requesting a new application from cluster with 1 NodeManagers
      16/07/14 15:06:49 INFO Client: Verifying our application has not requested more than the maximum memory capability of the cluster (8192 MB per container)
      16/07/14 15:06:49 INFO Client: Will allocate AM container, with 896 MB memory including 384 MB overhead
      16/07/14 15:06:49 INFO Client: Setting up container launch context for our AM
      16/07/14 15:06:49 INFO Client: Setting up the launch environment for our AM container
      16/07/14 15:06:49 INFO Client: Preparing resources for our AM container
      16/07/14 15:06:49 WARN Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.
      16/07/14 15:06:50 INFO Client: Uploading resource file:/private/var/folders/tb/8pw1511s2q78mj7plnq8p9g40000gn/T/spark-a446300b-84bf-43ff-bfb1-3adfb0571a42/__spark_libs__6486179704064718817.zip -> hdfs://localhost:8020/user/sshao/.sparkStaging/application_1468468348998_0009/__spark_libs__6486179704064718817.zip
      16/07/14 15:06:51 INFO Client: Uploading resource file:/Users/sshao/projects/apache-spark/examples/target/scala-2.11/jars/scopt_2.11-3.3.0.jar -> hdfs://localhost:8020/user/sshao/.sparkStaging/application_1468468348998_0009/scopt_2.11-3.3.0.jar
      16/07/14 15:06:51 INFO Client: Uploading resource file:/private/var/folders/tb/8pw1511s2q78mj7plnq8p9g40000gn/T/spark-a446300b-84bf-43ff-bfb1-3adfb0571a42/__spark_conf__326416236462420861.zip -> hdfs://localhost:8020/user/sshao/.sparkStaging/application_1468468348998_0009/__spark_conf__.zip
      ...
      ```
      
      So here try to avoid adding jars to Spark's fileserver unnecessarily.
      
      ## How was this patch tested?
      
      Manually verified both in yarn client and cluster mode, also in standalone mode.
      
      Author: jerryshao <sshao@hortonworks.com>
      
      Closes #14196 from jerryshao/SPARK-16540.
      91575cac
    • Jacek Lewandowski's avatar
      [SPARK-16528][SQL] Fix NPE problem in HiveClientImpl · 31ca741a
      Jacek Lewandowski authored
      ## What changes were proposed in this pull request?
      
      There are some calls to methods or fields (getParameters, properties) which are then passed to Java/Scala collection converters. Unfortunately those fields can be null in some cases and then the conversions throws NPE. We fix it by wrapping calls to those fields and methods with option and then do the conversion.
      
      ## How was this patch tested?
      
      Manually tested with a custom Hive metastore.
      
      Author: Jacek Lewandowski <lewandowski.jacek@gmail.com>
      
      Closes #14200 from jacek-lewandowski/SPARK-16528.
      31ca741a
    • Dongjoon Hyun's avatar
      [SPARK-16529][SQL][TEST] `withTempDatabase` should set `default` database before dropping · c576f9fb
      Dongjoon Hyun authored
      ## What changes were proposed in this pull request?
      
      `SQLTestUtils.withTempDatabase` is a frequently used test harness to setup a temporary table and clean up finally. This issue improves like the following for usability.
      
      ```scala
      -    try f(dbName) finally spark.sql(s"DROP DATABASE $dbName CASCADE")
      +    try f(dbName) finally {
      +      if (spark.catalog.currentDatabase == dbName) {
      +        spark.sql(s"USE ${DEFAULT_DATABASE}")
      +      }
      +      spark.sql(s"DROP DATABASE $dbName CASCADE")
      +    }
      ```
      
      In case of forgetting to reset the databaes, `withTempDatabase` will not raise Exception.
      
      ## How was this patch tested?
      
      This improves test harness.
      
      Author: Dongjoon Hyun <dongjoon@apache.org>
      
      Closes #14184 from dongjoon-hyun/SPARK-16529.
      c576f9fb
    • Felix Cheung's avatar
      [SPARK-16538][SPARKR] fix R call with namespace operator on SparkSession functions · 12005c88
      Felix Cheung authored
      ## What changes were proposed in this pull request?
      
      Fix function routing to work with and without namespace operator `SparkR::createDataFrame`
      
      ## How was this patch tested?
      
      manual, unit tests
      
      shivaram
      
      Author: Felix Cheung <felixcheung_m@hotmail.com>
      
      Closes #14195 from felixcheung/rroutedefault.
      12005c88
    • Sun Rui's avatar
      [SPARK-16509][SPARKR] Rename window.partitionBy and window.orderBy to... · 093ebbc6
      Sun Rui authored
      [SPARK-16509][SPARKR] Rename window.partitionBy and window.orderBy to windowPartitionBy and windowOrderBy.
      
      ## What changes were proposed in this pull request?
      Rename window.partitionBy and window.orderBy to windowPartitionBy and windowOrderBy to pass CRAN package check.
      
      ## How was this patch tested?
      SparkR unit tests.
      
      Author: Sun Rui <sunrui2016@gmail.com>
      
      Closes #14192 from sun-rui/SPARK-16509.
      093ebbc6
    • Dongjoon Hyun's avatar
      [SPARK-16543][SQL] Rename the columns of `SHOW PARTITION/COLUMNS` commands · 56183b84
      Dongjoon Hyun authored
      ## What changes were proposed in this pull request?
      
      This PR changes the name of columns returned by `SHOW PARTITION` and `SHOW COLUMNS` commands. Currently, both commands uses `result` as a column name.
      
      **Comparison: Column Name**
      
      Command|Spark(Before)|Spark(After)|Hive
      ----------|--------------|------------|-----
      SHOW PARTITIONS|result|partition|partition
      SHOW COLUMNS|result|col_name|field
      
      Note that Spark/Hive uses `col_name` in `DESC TABLES`. So, this PR chooses `col_name` for consistency among Spark commands.
      
      **Before**
      ```scala
      scala> sql("show partitions p").show()
      +------+
      |result|
      +------+
      |   b=2|
      +------+
      
      scala> sql("show columns in p").show()
      +------+
      |result|
      +------+
      |     a|
      |     b|
      +------+
      ```
      
      **After**
      ```scala
      scala> sql("show partitions p").show
      +---------+
      |partition|
      +---------+
      |      b=2|
      +---------+
      
      scala> sql("show columns in p").show
      +--------+
      |col_name|
      +--------+
      |       a|
      |       b|
      +--------+
      ```
      
      ## How was this patch tested?
      
      Manual.
      
      Author: Dongjoon Hyun <dongjoon@apache.org>
      
      Closes #14199 from dongjoon-hyun/SPARK-16543.
      56183b84
    • gatorsmile's avatar
      [SPARK-16530][SQL][TRIVIAL] Wrong Parser Keyword in ALTER TABLE CHANGE COLUMN · 1b5c9e52
      gatorsmile authored
      #### What changes were proposed in this pull request?
      Based on the [Hive SQL syntax](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-ChangeColumnName/Type/Position/Comment), the command to change column name/type/position/comment is `ALTER TABLE CHANGE COLUMN`. However, in our .g4 file, it is `ALTER TABLE CHANGE COLUMNS`. Because it is the last optional keyword, it does not take any effect. Thus, I put the issue as a Trivial level.
      
      cc hvanhovell
      
      #### How was this patch tested?
      Existing test cases
      
      Author: gatorsmile <gatorsmile@gmail.com>
      
      Closes #14186 from gatorsmile/changeColumns.
      1b5c9e52
    • Marcelo Vanzin's avatar
      [SPARK-16505][YARN] Optionally propagate error during shuffle service startup. · b7b5e178
      Marcelo Vanzin authored
      This prevents the NM from starting when something is wrong, which would
      lead to later errors which are confusing and harder to debug.
      
      Added a unit test to verify startup fails if something is wrong.
      
      Author: Marcelo Vanzin <vanzin@cloudera.com>
      
      Closes #14162 from vanzin/SPARK-16505.
      b7b5e178
    • jerryshao's avatar
      [SPARK-14963][MINOR][YARN] Fix typo in YarnShuffleService recovery file name · c4bc2ed8
      jerryshao authored
      ## What changes were proposed in this pull request?
      
      Due to the changes of [SPARK-14963](https://issues.apache.org/jira/browse/SPARK-14963), external shuffle recovery file name is changed mistakenly, so here change it back to the previous file name.
      
      This only affects the master branch, branch-2.0 is correct [here](https://github.com/apache/spark/blob/branch-2.0/common/network-yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java#L195).
      
      ## How was this patch tested?
      
      N/A
      
      Author: jerryshao <sshao@hortonworks.com>
      
      Closes #14197 from jerryshao/fix-typo-file-name.
      c4bc2ed8
    • Bryan Cutler's avatar
      [SPARK-16403][EXAMPLES] Cleanup to remove unused imports, consistent style, minor fixes · e3f8a033
      Bryan Cutler authored
      ## What changes were proposed in this pull request?
      
      Cleanup of examples, mostly from PySpark-ML to fix minor issues:  unused imports, style consistency, pipeline_example is a duplicate, use future print funciton, and a spelling error.
      
      * The "Pipeline Example" is duplicated by "Simple Text Classification Pipeline" in Scala, Python, and Java.
      
      * "Estimator Transformer Param Example" is duplicated by "Simple Params Example" in Scala, Python and Java
      
      * Synced random_forest_classifier_example.py with Scala by adding IndexToString label converted
      
      * Synced train_validation_split.py (in Scala ModelSelectionViaTrainValidationExample) by adjusting data split, adding grid for intercept.
      
      * RegexTokenizer was doing nothing in tokenizer_example.py and JavaTokenizerExample.java, synced with Scala version
      
      ## How was this patch tested?
      local tests and run modified examples
      
      Author: Bryan Cutler <cutlerb@gmail.com>
      
      Closes #14081 from BryanCutler/examples-cleanup-SPARK-16403.
      e3f8a033
    • WeichenXu's avatar
      [SPARK-16500][ML][MLLIB][OPTIMIZER] add LBFGS convergence warning for all used place in MLLib · 252d4f27
      WeichenXu authored
      ## What changes were proposed in this pull request?
      
      Add warning_for the following case when LBFGS training not actually convergence:
      
      1) LogisticRegression
      2) AFTSurvivalRegression
      3) LBFGS algorithm wrapper in mllib package
      
      ## How was this patch tested?
      
      N/A
      
      Author: WeichenXu <WeichenXu123@outlook.com>
      
      Closes #14157 from WeichenXu123/add_lbfgs_convergence_warning_for_all_used_place.
      252d4f27
    • Wenchen Fan's avatar
      [SPARK-16448] RemoveAliasOnlyProject should not remove alias with metadata · db7317ac
      Wenchen Fan authored
      ## What changes were proposed in this pull request?
      
      `Alias` with metadata is not a no-op and we should not strip it in `RemoveAliasOnlyProject` rule.
      This PR also did some improvement for this rule:
      
      1. extend the semantic of `alias-only`. Now we allow the project list to be partially aliased.
      2. add unit test for this rule.
      
      ## How was this patch tested?
      
      new `RemoveAliasOnlyProjectSuite`
      
      Author: Wenchen Fan <wenchen@databricks.com>
      
      Closes #14106 from cloud-fan/bug.
      db7317ac
    • Liwei Lin's avatar
      [SPARK-16503] SparkSession should provide Spark version · 39c836e9
      Liwei Lin authored
      ## What changes were proposed in this pull request?
      
      This patch enables SparkSession to provide spark version.
      
      ## How was this patch tested?
      
      Manual test:
      
      ```
      scala> sc.version
      res0: String = 2.1.0-SNAPSHOT
      
      scala> spark.version
      res1: String = 2.1.0-SNAPSHOT
      ```
      
      ```
      >>> sc.version
      u'2.1.0-SNAPSHOT'
      >>> spark.version
      u'2.1.0-SNAPSHOT'
      ```
      
      Author: Liwei Lin <lwlin7@gmail.com>
      
      Closes #14165 from lw-lin/add-version.
      39c836e9
    • Dongjoon Hyun's avatar
      [SPARK-16536][SQL][PYSPARK][MINOR] Expose `sql` in PySpark Shell · 9c530576
      Dongjoon Hyun authored
      ## What changes were proposed in this pull request?
      
      This PR exposes `sql` in PySpark Shell like Scala/R Shells for consistency.
      
      **Background**
       * Scala
       ```scala
      scala> sql("select 1 a")
      res0: org.apache.spark.sql.DataFrame = [a: int]
      ```
      
       * R
       ```r
      > sql("select 1")
      SparkDataFrame[1:int]
      ```
      
      **Before**
       * Python
      
       ```python
      >>> sql("select 1 a")
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      NameError: name 'sql' is not defined
      ```
      
      **After**
       * Python
      
       ```python
      >>> sql("select 1 a")
      DataFrame[a: int]
      ```
      
      ## How was this patch tested?
      
      Manual.
      
      Author: Dongjoon Hyun <dongjoon@apache.org>
      
      Closes #14190 from dongjoon-hyun/SPARK-16536.
      9c530576
  4. Jul 13, 2016
    • Joseph K. Bradley's avatar
      [SPARK-16485][ML][DOC] Fix privacy of GLM members, rename sqlDataTypes for ML, doc fixes · a5f51e21
      Joseph K. Bradley authored
      ## What changes were proposed in this pull request?
      
      Fixing issues found during 2.0 API checks:
      * GeneralizedLinearRegressionModel: linkObj, familyObj, familyAndLink should not be exposed
      * sqlDataTypes: name does not follow conventions. Do we need to expose it?
      * Evaluator: inconsistent doc between evaluate and isLargerBetter
      * MinMaxScaler: math rendering --> hard to make it great, but I'll change it a little
      * GeneralizedLinearRegressionSummary: aic doc is incorrect --> will change to use more common name
      
      ## How was this patch tested?
      
      Existing unit tests.  Docs generated locally.  (MinMaxScaler is improved a tiny bit.)
      
      Author: Joseph K. Bradley <joseph@databricks.com>
      
      Closes #14187 from jkbradley/final-api-check-2.0.
      a5f51e21
    • gatorsmile's avatar
      [SPARK-16482][SQL] Describe Table Command for Tables Requiring Runtime Inferred Schema · c5ec8798
      gatorsmile authored
      #### What changes were proposed in this pull request?
      If we create a table pointing to a parquet/json datasets without specifying the schema, describe table command does not show the schema at all. It only shows `# Schema of this table is inferred at runtime`. In 1.6, describe table does show the schema of such a table.
      
      ~~For data source tables, to infer the schema, we need to load the data source tables at runtime. Thus, this PR calls the function `lookupRelation`.~~
      
      For data source tables, we infer the schema before table creation. Thus, this PR set the inferred schema as the table schema when table creation.
      
      #### How was this patch tested?
      Added test cases
      
      Author: gatorsmile <gatorsmile@gmail.com>
      
      Closes #14148 from gatorsmile/describeSchema.
      c5ec8798
    • Felix Cheung's avatar
      [SPARKR][DOCS][MINOR] R programming guide to include csv data source example · fb2e8eeb
      Felix Cheung authored
      ## What changes were proposed in this pull request?
      
      Minor documentation update for code example, code style, and missed reference to "sparkR.init"
      
      ## How was this patch tested?
      
      manual
      
      shivaram
      
      Author: Felix Cheung <felixcheung_m@hotmail.com>
      
      Closes #14178 from felixcheung/rcsvprogrammingguide.
      fb2e8eeb
    • Felix Cheung's avatar
      [SPARKR][MINOR] R examples and test updates · b4baf086
      Felix Cheung authored
      ## What changes were proposed in this pull request?
      
      Minor example updates
      
      ## How was this patch tested?
      
      manual
      
      shivaram
      
      Author: Felix Cheung <felixcheung_m@hotmail.com>
      
      Closes #14171 from felixcheung/rexample.
      b4baf086
    • James Thomas's avatar
      [SPARK-16114][SQL] updated structured streaming guide · 51a6706b
      James Thomas authored
      ## What changes were proposed in this pull request?
      
      Updated structured streaming programming guide with new windowed example.
      
      ## How was this patch tested?
      
      Docs
      
      Author: James Thomas <jamesjoethomas@gmail.com>
      
      Closes #14183 from jjthomas/ss_docs_update.
      51a6706b
    • Burak Yavuz's avatar
      [SPARK-16531][SQL][TEST] Remove timezone setting from DataFrameTimeWindowingSuite · 0744d84c
      Burak Yavuz authored
      ## What changes were proposed in this pull request?
      
      It's unnecessary. `QueryTest` already sets it.
      
      Author: Burak Yavuz <brkyvz@gmail.com>
      
      Closes #14170 from brkyvz/test-tz.
      0744d84c
    • Joseph K. Bradley's avatar
      [SPARK-14812][ML][MLLIB][PYTHON] Experimental, DeveloperApi annotation audit for ML · 01f09b16
      Joseph K. Bradley authored
      ## What changes were proposed in this pull request?
      
      General decisions to follow, except where noted:
      * spark.mllib, pyspark.mllib: Remove all Experimental annotations.  Leave DeveloperApi annotations alone.
      * spark.ml, pyspark.ml
      ** Annotate Estimator-Model pairs of classes and companion objects the same way.
      ** For all algorithms marked Experimental with Since tag <= 1.6, remove Experimental annotation.
      ** For all algorithms marked Experimental with Since tag = 2.0, leave Experimental annotation.
      * DeveloperApi annotations are left alone, except where noted.
      * No changes to which types are sealed.
      
      Exceptions where I am leaving items Experimental in spark.ml, pyspark.ml, mainly because the items are new:
      * Model Summary classes
      * MLWriter, MLReader, MLWritable, MLReadable
      * Evaluator and subclasses: There is discussion of changes around evaluating multiple metrics at once for efficiency.
      * RFormula: Its behavior may need to change slightly to match R in edge cases.
      * AFTSurvivalRegression
      * MultilayerPerceptronClassifier
      
      DeveloperApi changes:
      * ml.tree.Node, ml.tree.Split, and subclasses should no longer be DeveloperApi
      
      ## How was this patch tested?
      
      N/A
      
      Note to reviewers:
      * spark.ml.clustering.LDA underwent significant changes (additional methods), so let me know if you want me to leave it Experimental.
      * Be careful to check for cases where a class should no longer be Experimental but has an Experimental method, val, or other feature.  I did not find such cases, but please verify.
      
      Author: Joseph K. Bradley <joseph@databricks.com>
      
      Closes #14147 from jkbradley/experimental-audit.
      01f09b16
    • jerryshao's avatar
      [SPARK-16435][YARN][MINOR] Add warning log if initialExecutors is less than minExecutors · d8220c1e
      jerryshao authored
      ## What changes were proposed in this pull request?
      
      Currently if `spark.dynamicAllocation.initialExecutors` is less than `spark.dynamicAllocation.minExecutors`, Spark will automatically pick the minExecutors without any warning. While in 1.6 Spark will throw exception if configured like this. So here propose to add warning log if these parameters are configured invalidly.
      
      ## How was this patch tested?
      
      Unit test added to verify the scenario.
      
      Author: jerryshao <sshao@hortonworks.com>
      
      Closes #14149 from jerryshao/SPARK-16435.
      d8220c1e
    • 蒋星博's avatar
      [SPARK-16343][SQL] Improve the PushDownPredicate rule to pushdown predicates... · f376c372
      蒋星博 authored
      [SPARK-16343][SQL] Improve the PushDownPredicate rule to pushdown predicates correctly in non-deterministic condition.
      
      ## What changes were proposed in this pull request?
      
      Currently our Optimizer may reorder the predicates to run them more efficient, but in non-deterministic condition, change the order between deterministic parts and non-deterministic parts may change the number of input rows. For example:
      ```SELECT a FROM t WHERE rand() < 0.1 AND a = 1```
      And
      ```SELECT a FROM t WHERE a = 1 AND rand() < 0.1```
      may call rand() for different times and therefore the output rows differ.
      
      This PR improved this condition by checking whether the predicate is placed before any non-deterministic predicates.
      
      ## How was this patch tested?
      
      Expanded related testcases in FilterPushdownSuite.
      
      Author: 蒋星博 <jiangxingbo@meituan.com>
      
      Closes #14012 from jiangxb1987/ppd.
      f376c372
    • oraviv's avatar
      [SPARK-16469] enhanced simulate multiply · ea06e4ef
      oraviv authored
      ## What changes were proposed in this pull request?
      
      We have a use case of multiplying very big sparse matrices. we have about 1000x1000 distributed block matrices multiplication and the simulate multiply goes like O(n^4) (n being 1000). it takes about 1.5 hours. We modified it slightly with classical hashmap and now run in about 30 seconds O(n^2).
      
      ## How was this patch tested?
      
      We have added a performance test and verified the reduced time.
      
      Author: oraviv <oraviv@paypal.com>
      
      Closes #14068 from uzadude/master.
      ea06e4ef
    • Sean Owen's avatar
      [SPARK-16440][MLLIB] Undeleted broadcast variables in Word2Vec causing OoM for long runs · 51ade51a
      Sean Owen authored
      ## What changes were proposed in this pull request?
      
      Unpersist broadcasted vars in Word2Vec.fit for more timely / reliable resource cleanup
      
      ## How was this patch tested?
      
      Jenkins tests
      
      Author: Sean Owen <sowen@cloudera.com>
      
      Closes #14153 from srowen/SPARK-16440.
      51ade51a
    • sharkd's avatar
      [MINOR][YARN] Fix code error in yarn-cluster unit test · 3d6f679c
      sharkd authored
      ## What changes were proposed in this pull request?
      
      Fix code error in yarn-cluster unit test.
      
      ## How was this patch tested?
      
      Use exist tests
      
      Author: sharkd <sharkd.tu@gmail.com>
      
      Closes #14166 from sharkdtu/master.
      3d6f679c
    • sandy's avatar
      [SPARK-16438] Add Asynchronous Actions documentation · bf107f1e
      sandy authored
      ## What changes were proposed in this pull request?
      
      Add Asynchronous Actions documentation inside action of programming guide
      
      ## How was this patch tested?
      
      check the documentation indentation and formatting with md preview.
      
      Author: sandy <phalodi@gmail.com>
      
      Closes #14104 from phalodi/SPARK-16438.
      bf107f1e
    • Maciej Brynski's avatar
      [SPARK-16439] Fix number formatting in SQL UI · 83879ebc
      Maciej Brynski authored
      ## What changes were proposed in this pull request?
      
      Spark SQL UI display numbers greater than 1000 with u00A0 as grouping separator.
      Problem exists when server locale has no-breaking space as separator. (for example pl_PL)
      This patch turns off grouping and remove this separator.
      
      The problem starts with this PR.
      https://github.com/apache/spark/pull/12425/files#diff-803f475b01acfae1c5c96807c2ea9ddcR125
      
      ## How was this patch tested?
      
      Manual UI tests. Screenshot attached.
      
      ![image](https://cloud.githubusercontent.com/assets/4006010/16749556/5cb5a372-47cb-11e6-9a95-67fd3f9d1c71.png)
      
      Author: Maciej Brynski <maciej.brynski@adpilot.pl>
      
      Closes #14142 from maver1ck/master.
      83879ebc
    • Xin Ren's avatar
      [MINOR] Fix Java style errors and remove unused imports · f73891e0
      Xin Ren authored
      ## What changes were proposed in this pull request?
      
      Fix Java style errors and remove unused imports, which are randomly found
      
      ## How was this patch tested?
      
      Tested on my local machine.
      
      Author: Xin Ren <iamshrek@126.com>
      
      Closes #14161 from keypointt/SPARK-16437.
      f73891e0
Loading