You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by alanyeok <gi...@git.apache.org> on 2018/01/14 05:56:58 UTC

[GitHub] spark pull request #20262: Branch 2.2

GitHub user alanyeok opened a pull request:

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

    Branch 2.2

    ## What changes were proposed in this pull request?
    
    (Please fill in changes proposed in this fix)
    
    ## How was this patch tested?
    
    (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
    (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
    
    Please review http://spark.apache.org/contributing.html before opening a pull request.


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

    $ git pull https://github.com/apache/spark branch-2.2

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

    https://github.com/apache/spark/pull/20262.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 #20262
    
----
commit 8b08fd06c0e22e7967c05aee83654b6be446efb4
Author: Herman van Hovell <hv...@...>
Date:   2017-06-30T04:34:09Z

    [SPARK-21258][SQL] Fix WindowExec complex object aggregation with spilling
    
    ## What changes were proposed in this pull request?
    `WindowExec` currently improperly stores complex objects (UnsafeRow, UnsafeArrayData, UnsafeMapData, UTF8String) during aggregation by keeping a reference in the buffer used by `GeneratedMutableProjections` to the actual input data. Things go wrong when the input object (or the backing bytes) are reused for other things. This could happen in window functions when it starts spilling to disk. When reading the back the spill files the `UnsafeSorterSpillReader` reuses the buffer to which the `UnsafeRow` points, leading to weird corruption scenario's. Note that this only happens for aggregate functions that preserve (parts of) their input, for example `FIRST`, `LAST`, `MIN` & `MAX`.
    
    This was not seen before, because the spilling logic was not doing actual spills as much and actually used an in-memory page. This page was not cleaned up during window processing and made sure unsafe objects point to their own dedicated memory location. This was changed by https://github.com/apache/spark/pull/16909, after this PR Spark spills more eagerly.
    
    This PR provides a surgical fix because we are close to releasing Spark 2.2. This change just makes sure that there cannot be any object reuse at the expensive of a little bit of performance. We will follow-up with a more subtle solution at a later point.
    
    ## How was this patch tested?
    Added a regression test to `DataFrameWindowFunctionsSuite`.
    
    Author: Herman van Hovell <hv...@databricks.com>
    
    Closes #18470 from hvanhovell/SPARK-21258.
    
    (cherry picked from commit e2f32ee45ac907f1f53fde7e412676a849a94872)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit 29a0be2b3d42bfe991f47725f077892918731e08
Author: Xiao Li <ga...@...>
Date:   2017-06-30T21:23:56Z

    [SPARK-21129][SQL] Arguments of SQL function call should not be named expressions
    
    ### What changes were proposed in this pull request?
    
    Function argument should not be named expressions. It could cause two issues:
    - Misleading error message
    - Unexpected query results when the column name is `distinct`, which is not a reserved word in our parser.
    
    ```
    spark-sql> select count(distinct c1, distinct c2) from t1;
    Error in query: cannot resolve '`distinct`' given input columns: [c1, c2]; line 1 pos 26;
    'Project [unresolvedalias('count(c1#30, 'distinct), None)]
    +- SubqueryAlias t1
       +- CatalogRelation `default`.`t1`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, [c1#30, c2#31]
    ```
    
    After the fix, the error message becomes
    ```
    spark-sql> select count(distinct c1, distinct c2) from t1;
    Error in query:
    extraneous input 'c2' expecting {')', ',', '.', '[', 'OR', 'AND', 'IN', NOT, 'BETWEEN', 'LIKE', RLIKE, 'IS', EQ, '<=>', '<>', '!=', '<', LTE, '>', GTE, '+', '-', '*', '/', '%', 'DIV', '&', '|', '||', '^'}(line 1, pos 35)
    
    == SQL ==
    select count(distinct c1, distinct c2) from t1
    -----------------------------------^^^
    ```
    
    ### How was this patch tested?
    Added a test case to parser suite.
    
    Author: Xiao Li <ga...@gmail.com>
    Author: gatorsmile <ga...@gmail.com>
    
    Closes #18338 from gatorsmile/parserDistinctAggFunc.
    
    (cherry picked from commit eed9c4ef859fdb75a816a3e0ce2d593b34b23444)
    Signed-off-by: gatorsmile <ga...@gmail.com>

commit a2c7b2133cfee7fa9abfaa2bfbfb637155466783
Author: Patrick Wendell <pw...@...>
Date:   2017-06-30T22:54:34Z

    Preparing Spark release v2.2.0-rc6

commit 85fddf406429dac00ddfb2e6c30870da450455bd
Author: Patrick Wendell <pw...@...>
Date:   2017-06-30T22:54:39Z

    Preparing development version 2.2.1-SNAPSHOT

commit 6fd39ea1c9dbf68763cb394a28d8a13c116341df
Author: Devaraj K <de...@...>
Date:   2017-07-01T14:53:49Z

    [SPARK-21170][CORE] Utils.tryWithSafeFinallyAndFailureCallbacks throws IllegalArgumentException: Self-suppression not permitted
    
    ## What changes were proposed in this pull request?
    
    Not adding the exception to the suppressed if it is the same instance as originalThrowable.
    
    ## How was this patch tested?
    
    Added new tests to verify this, these tests fail without source code changes and passes with the change.
    
    Author: Devaraj K <de...@apache.org>
    
    Closes #18384 from devaraj-kavali/SPARK-21170.
    
    (cherry picked from commit 6beca9ce94f484de2f9ffb946bef8334781b3122)
    Signed-off-by: Sean Owen <so...@cloudera.com>

commit db21b679343aba54b240e1d552cf7ec772109f22
Author: Dongjoon Hyun <do...@...>
Date:   2017-07-04T16:48:40Z

    [SPARK-20256][SQL] SessionState should be created more lazily
    
    ## What changes were proposed in this pull request?
    
    `SessionState` is designed to be created lazily. However, in reality, it created immediately in `SparkSession.Builder.getOrCreate` ([here](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala#L943)).
    
    This PR aims to recover the lazy behavior by keeping the options into `initialSessionOptions`. The benefit is like the following. Users can start `spark-shell` and use RDD operations without any problems.
    
    **BEFORE**
    ```scala
    $ bin/spark-shell
    java.lang.IllegalArgumentException: Error while instantiating 'org.apache.spark.sql.hive.HiveSessionStateBuilder'
    ...
    Caused by: org.apache.spark.sql.AnalysisException:
        org.apache.hadoop.hive.ql.metadata.HiveException:
           MetaException(message:java.security.AccessControlException:
              Permission denied: user=spark, access=READ,
                 inode="/apps/hive/warehouse":hive:hdfs:drwx------
    ```
    As reported in SPARK-20256, this happens when the warehouse directory is not allowed for this user.
    
    **AFTER**
    ```scala
    $ bin/spark-shell
    ...
    Welcome to
          ____              __
         / __/__  ___ _____/ /__
        _\ \/ _ \/ _ `/ __/  '_/
       /___/ .__/\_,_/_/ /_/\_\   version 2.3.0-SNAPSHOT
          /_/
    
    Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112)
    Type in expressions to have them evaluated.
    Type :help for more information.
    
    scala> sc.range(0, 10, 1).count()
    res0: Long = 10
    ```
    
    ## How was this patch tested?
    
    Manual.
    
    This closes #18512 .
    
    Author: Dongjoon Hyun <do...@apache.org>
    
    Closes #18501 from dongjoon-hyun/SPARK-20256.
    
    (cherry picked from commit 1b50e0e0d6fd9d1b815a3bb37647ea659222e3f1)
    Signed-off-by: gatorsmile <ga...@gmail.com>

commit 770fd2a239798d3fa1cb4223d73cfc57413c0bb8
Author: Takuya UESHIN <ue...@...>
Date:   2017-07-05T03:24:38Z

    [SPARK-21300][SQL] ExternalMapToCatalyst should null-check map key prior to converting to internal value.
    
    ## What changes were proposed in this pull request?
    
    `ExternalMapToCatalyst` should null-check map key prior to converting to internal value to throw an appropriate Exception instead of something like NPE.
    
    ## How was this patch tested?
    
    Added a test and existing tests.
    
    Author: Takuya UESHIN <ue...@databricks.com>
    
    Closes #18524 from ueshin/issues/SPARK-21300.
    
    (cherry picked from commit ce10545d3401c555e56a214b7c2f334274803660)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit 6e1081cbeac58826526b6ff7f2938a556b31ca9e
Author: Sumedh Wale <sw...@...>
Date:   2017-07-06T06:47:22Z

    [SPARK-21312][SQL] correct offsetInBytes in UnsafeRow.writeToStream
    
    ## What changes were proposed in this pull request?
    
    Corrects offsetInBytes calculation in UnsafeRow.writeToStream. Known failures include writes to some DataSources that have own SparkPlan implementations and cause EXCHANGE in writes.
    
    ## How was this patch tested?
    
    Extended UnsafeRowSuite.writeToStream to include an UnsafeRow over byte array having non-zero offset.
    
    Author: Sumedh Wale <sw...@snappydata.io>
    
    Closes #18535 from sumwale/SPARK-21312.
    
    (cherry picked from commit 14a3bb3a008c302aac908d7deaf0942a98c63be7)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit 4e53a4edd72e372583f243c660bbcc0572205716
Author: Tathagata Das <ta...@...>
Date:   2017-07-06T07:20:26Z

    [SS][MINOR] Fix flaky test in DatastreamReaderWriterSuite. temp checkpoint dir should be deleted
    
    ## What changes were proposed in this pull request?
    
    Stopping query while it is being initialized can throw interrupt exception, in which case temporary checkpoint directories will not be deleted, and the test will fail.
    
    Author: Tathagata Das <ta...@gmail.com>
    
    Closes #18442 from tdas/DatastreamReaderWriterSuite-fix.
    
    (cherry picked from commit 60043f22458668ac7ecba94fa78953f23a6bdcec)
    Signed-off-by: Tathagata Das <ta...@gmail.com>

commit 576fd4c3a67b4affc5ac50979e27ae929472f0d9
Author: Tathagata Das <ta...@...>
Date:   2017-07-07T00:28:20Z

    [SPARK-21267][SS][DOCS] Update Structured Streaming Documentation
    
    ## What changes were proposed in this pull request?
    
    Few changes to the Structured Streaming documentation
    - Clarify that the entire stream input table is not materialized
    - Add information for Ganglia
    - Add Kafka Sink to the main docs
    - Removed a couple of leftover experimental tags
    - Added more associated reading material and talk videos.
    
    In addition, https://github.com/apache/spark/pull/16856 broke the link to the RDD programming guide in several places while renaming the page. This PR fixes those sameeragarwal cloud-fan.
    - Added a redirection to avoid breaking internal and possible external links.
    - Removed unnecessary redirection pages that were there since the separate scala, java, and python programming guides were merged together in 2013 or 2014.
    
    ## How was this patch tested?
    
    (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
    (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
    
    Please review http://spark.apache.org/contributing.html before opening a pull request.
    
    Author: Tathagata Das <ta...@gmail.com>
    
    Closes #18485 from tdas/SPARK-21267.
    
    (cherry picked from commit 0217dfd26f89133f146197359b556c9bf5aca172)
    Signed-off-by: Shixiong Zhu <sh...@databricks.com>

commit ab12848d624f6b74d401e924255c0b4fcc535231
Author: Prashant Sharma <pr...@...>
Date:   2017-07-08T06:33:12Z

    [SPARK-21069][SS][DOCS] Add rate source to programming guide.
    
    ## What changes were proposed in this pull request?
    
    SPARK-20979 added a new structured streaming source: Rate source. This patch adds the corresponding documentation to programming guide.
    
    ## How was this patch tested?
    
    Tested by running jekyll locally.
    
    Author: Prashant Sharma <pr...@apache.org>
    Author: Prashant Sharma <pr...@in.ibm.com>
    
    Closes #18562 from ScrapCodes/spark-21069/rate-source-docs.
    
    (cherry picked from commit d0bfc6733521709e453d643582df2bdd68f28de7)
    Signed-off-by: Shixiong Zhu <sh...@databricks.com>

commit 7d0b1c927d92cc2a4932262514ffd12c47593b80
Author: Bogdan Raducanu <bo...@...>
Date:   2017-07-08T12:14:59Z

    [SPARK-21228][SQL][BRANCH-2.2] InSet incorrect handling of structs
    
    ## What changes were proposed in this pull request?
    
    This is backport of https://github.com/apache/spark/pull/18455
    When data type is struct, InSet now uses TypeUtils.getInterpretedOrdering (similar to EqualTo) to build a TreeSet. In other cases it will use a HashSet as before (which should be faster). Similarly, In.eval uses Ordering.equiv instead of equals.
    
    ## How was this patch tested?
    New test in SQLQuerySuite.
    
    Author: Bogdan Raducanu <bo...@databricks.com>
    
    Closes #18563 from bogdanrdc/SPARK-21228-BRANCH2.2.

commit a64f10800244a8057f7f32c3d2f4a719c5080d05
Author: Dongjoon Hyun <do...@...>
Date:   2017-07-08T12:16:47Z

    [SPARK-21345][SQL][TEST][TEST-MAVEN] SparkSessionBuilderSuite should clean up stopped sessions.
    
    `SparkSessionBuilderSuite` should clean up stopped sessions. Otherwise, it leaves behind some stopped `SparkContext`s interfereing with other test suites using `ShardSQLContext`.
    
    Recently, master branch fails consequtively.
    - https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test%20(Dashboard)/
    
    Pass the Jenkins with a updated suite.
    
    Author: Dongjoon Hyun <do...@apache.org>
    
    Closes #18567 from dongjoon-hyun/SPARK-SESSION.
    
    (cherry picked from commit 0b8dd2d08460f3e6eb578727d2c336b6f11959e7)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit c8d7855b905742033b7588ce7ee28bc23de13709
Author: Marcelo Vanzin <va...@...>
Date:   2017-07-08T16:24:54Z

    [SPARK-20342][CORE] Update task accumulators before sending task end event.
    
    This makes sures that listeners get updated task information; otherwise it's
    possible to write incomplete task information into event logs, for example,
    making the information in a replayed UI inconsistent with the original
    application.
    
    Added a new unit test to try to detect the problem, but it's not guaranteed
    to fail since it's a race; but it fails pretty reliably for me without the
    scheduler changes.
    
    Author: Marcelo Vanzin <va...@cloudera.com>
    
    Closes #18393 from vanzin/SPARK-20342.try2.
    
    (cherry picked from commit 9131bdb7e12bcfb2cb699b3438f554604e28aaa8)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit 964332b2879af048a95606dfcb4f2cb2e356135b
Author: jinxing <ji...@...>
Date:   2017-07-08T16:27:58Z

    [SPARK-21343] Refine the document for spark.reducer.maxReqSizeShuffleToMem.
    
    ## What changes were proposed in this pull request?
    
    In current code, reducer can break the old shuffle service when `spark.reducer.maxReqSizeShuffleToMem` is enabled. Let's refine document.
    
    Author: jinxing <ji...@126.com>
    
    Closes #18566 from jinxing64/SPARK-21343.
    
    (cherry picked from commit 062c336d06a0bd4e740a18d2349e03e311509243)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit 3bfad9d4210f96dcd2270599257c3a5272cad77b
Author: Zhenhua Wang <wa...@...>
Date:   2017-07-09T10:51:06Z

    [SPARK-21083][SQL][BRANCH-2.2] Store zero size and row count when analyzing empty table
    
    ## What changes were proposed in this pull request?
    
    We should be able to store zero size and row count after analyzing empty table.
    This is a backport for https://github.com/apache/spark/commit/9fccc3627fa41d32fbae6dbbb9bd1521e43eb4f0.
    
    ## How was this patch tested?
    
    Added new test.
    
    Author: Zhenhua Wang <wa...@huawei.com>
    
    Closes #18575 from wzhfy/analyzeEmptyTable-2.2.

commit 40fd0ce7f2c2facb96fc5d613bc7b6e4b573d9f7
Author: jinxing <ji...@...>
Date:   2017-07-10T13:06:58Z

    [SPARK-21342] Fix DownloadCallback to work well with RetryingBlockFetcher.
    
    When `RetryingBlockFetcher` retries fetching blocks. There could be two `DownloadCallback`s download the same content to the same target file. It could cause `ShuffleBlockFetcherIterator` reading a partial result.
    
    This pr proposes to create and delete the tmp files in `OneForOneBlockFetcher`
    
    Author: jinxing <ji...@126.com>
    Author: Shixiong Zhu <zs...@gmail.com>
    
    Closes #18565 from jinxing64/SPARK-21342.
    
    (cherry picked from commit 6a06c4b03c4dd86241fb9d11b4360371488f0e53)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit a05edf454a67261c89f0f2ecd1fe46bb8cebc257
Author: Juliusz Sompolski <ju...@...>
Date:   2017-07-10T16:26:42Z

    [SPARK-21272] SortMergeJoin LeftAnti does not update numOutputRows
    
    ## What changes were proposed in this pull request?
    
    Updating numOutputRows metric was missing from one return path of LeftAnti SortMergeJoin.
    
    ## How was this patch tested?
    
    Non-zero output rows manually seen in metrics.
    
    Author: Juliusz Sompolski <ju...@databricks.com>
    
    Closes #18494 from juliuszsompolski/SPARK-21272.

commit edcd9fbc92683753d55ed0c69f391bf3bed59da4
Author: Shixiong Zhu <sh...@...>
Date:   2017-07-11T03:26:17Z

    [SPARK-21369][CORE] Don't use Scala Tuple2 in common/network-*
    
    ## What changes were proposed in this pull request?
    
    Remove all usages of Scala Tuple2 from common/network-* projects. Otherwise, Yarn users cannot use `spark.reducer.maxReqSizeShuffleToMem`.
    
    ## How was this patch tested?
    
    Jenkins.
    
    Author: Shixiong Zhu <sh...@databricks.com>
    
    Closes #18593 from zsxwing/SPARK-21369.
    
    (cherry picked from commit 833eab2c9bd273ee9577fbf9e480d3e3a4b7d203)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit 399aa016e8f44fea4e5ef4b71a9a80484dd755f8
Author: Xingbo Jiang <xi...@...>
Date:   2017-07-11T13:52:54Z

    [SPARK-21366][SQL][TEST] Add sql test for window functions
    
    ## What changes were proposed in this pull request?
    
    Add sql test for window functions, also remove uncecessary test cases in `WindowQuerySuite`.
    
    ## How was this patch tested?
    
    Added `window.sql` and the corresponding output file.
    
    Author: Xingbo Jiang <xi...@databricks.com>
    
    Closes #18591 from jiangxb1987/window.
    
    (cherry picked from commit 66d21686556681457aab6e44e19f5614c5635f0c)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit cb6fc89ba20a427fa7d66fa5036b17c1a5d5d87f
Author: Eric Vandenberg <er...@...>
Date:   2017-07-12T06:49:15Z

    [SPARK-21219][CORE] Task retry occurs on same executor due to race co…
    
    …ndition with blacklisting
    
    There's a race condition in the current TaskSetManager where a failed task is added for retry (addPendingTask), and can asynchronously be assigned to an executor *prior* to the blacklist state (updateBlacklistForFailedTask), the result is the task might re-execute on the same executor.  This is particularly problematic if the executor is shutting down since the retry task immediately becomes a lost task (ExecutorLostFailure).  Another side effect is that the actual failure reason gets obscured by the retry task which never actually executed.  There are sample logs showing the issue in the https://issues.apache.org/jira/browse/SPARK-21219
    
    The fix is to change the ordering of the addPendingTask and updatingBlackListForFailedTask calls in TaskSetManager.handleFailedTask
    
    Implemented a unit test that verifies the task is black listed before it is added to the pending task.  Ran the unit test without the fix and it fails.  Ran the unit test with the fix and it passes.
    
    Please review http://spark.apache.org/contributing.html before opening a pull request.
    
    Author: Eric Vandenberg <ericvandenbergfb.com>
    
    Closes #18427 from ericvandenbergfb/blacklistFix.
    
    ## What changes were proposed in this pull request?
    
    This is a backport of the fix to SPARK-21219, already checked in as 96d58f2.
    
    ## How was this patch tested?
    
    Ran TaskSetManagerSuite tests locally.
    
    Author: Eric Vandenberg <er...@fb.com>
    
    Closes #18604 from jsoltren/branch-2.2.

commit 39eba3053ac99f03d9df56471bae5fc5cc9f4462
Author: Kohki Nishio <ta...@...>
Date:   2017-07-13T00:22:40Z

    [SPARK-18646][REPL] Set parent classloader as null for ExecutorClassLoader
    
    ## What changes were proposed in this pull request?
    
    `ClassLoader` will preferentially load class from `parent`. Only when `parent` is null or the load failed, that it will call the overridden `findClass` function. To avoid the potential issue caused by loading class using inappropriate class loader, we should set the `parent` of `ClassLoader` to null, so that we can fully control which class loader is used.
    
    This is take over of #17074,  the primary author of this PR is taroplus .
    
    Should close #17074 after this PR get merged.
    
    ## How was this patch tested?
    
    Add test case in `ExecutorClassLoaderSuite`.
    
    Author: Kohki Nishio <ta...@me.com>
    Author: Xingbo Jiang <xi...@databricks.com>
    
    Closes #18614 from jiangxb1987/executor_classloader.
    
    (cherry picked from commit e08d06b37bc96cc48fec1c5e40f73e0bca09c616)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit cf0719b5e99333b28bb4066b304dbcf8400c80ea
Author: Wenchen Fan <we...@...>
Date:   2017-07-13T00:34:42Z

    Revert "[SPARK-18646][REPL] Set parent classloader as null for ExecutorClassLoader"
    
    This reverts commit 39eba3053ac99f03d9df56471bae5fc5cc9f4462.

commit bfe3ba86936ffaabff9f89d03018eb368d246b4d
Author: jerryshao <ss...@...>
Date:   2017-07-13T22:25:38Z

    [SPARK-21376][YARN] Fix yarn client token expire issue when cleaning the staging files in long running scenario
    
    ## What changes were proposed in this pull request?
    
    This issue happens in long running application with yarn cluster mode, because yarn#client doesn't sync token with AM, so it will always keep the initial token, this token may be expired in the long running scenario, so when yarn#client tries to clean up staging directory after application finished, it will use this expired token and meet token expire issue.
    
    ## How was this patch tested?
    
    Manual verification is secure cluster.
    
    Author: jerryshao <ss...@hortonworks.com>
    
    Closes #18617 from jerryshao/SPARK-21376.
    
    (cherry picked from commit cb8d5cc90ff8d3c991ff33da41b136ab7634f71b)

commit 1cb4369a5b894619582e0d5ccc8c1f4ecb8ae36a
Author: Kazuaki Ishizaki <is...@...>
Date:   2017-07-15T03:16:04Z

    [SPARK-21344][SQL] BinaryType comparison does signed byte array comparison
    
    ## What changes were proposed in this pull request?
    
    This PR fixes a wrong comparison for `BinaryType`. This PR enables unsigned comparison and unsigned prefix generation for an array for `BinaryType`. Previous implementations uses signed operations.
    
    ## How was this patch tested?
    
    Added a test suite in `OrderingSuite`.
    
    Author: Kazuaki Ishizaki <is...@jp.ibm.com>
    
    Closes #18571 from kiszk/SPARK-21344.
    
    (cherry picked from commit ac5d5d795909061a17e056696cf0ef87d9e65dd1)
    Signed-off-by: gatorsmile <ga...@gmail.com>

commit 8e85ce625127f62b7e2abdfab81c7bcbebcc8448
Author: Sean Owen <so...@...>
Date:   2017-07-15T08:21:29Z

    [SPARK-21267][DOCS][MINOR] Follow up to avoid referencing programming-guide redirector
    
    ## What changes were proposed in this pull request?
    
    Update internal references from programming-guide to rdd-programming-guide
    
    See https://github.com/apache/spark-website/commit/5ddf243fd84a0f0f98a5193a207737cea9cdc083 and https://github.com/apache/spark/pull/18485#issuecomment-314789751
    
    Let's keep the redirector even if it's problematic to build, but not rely on it internally.
    
    ## How was this patch tested?
    
    (Doc build)
    
    Author: Sean Owen <so...@cloudera.com>
    
    Closes #18625 from srowen/SPARK-21267.2.
    
    (cherry picked from commit 74ac1fb081e9532d77278a4edca9f3f129fd62eb)
    Signed-off-by: Sean Owen <so...@cloudera.com>

commit 0ef98fd435ff77196780c2cad6e1bda377b2642f
Author: John Lee <jl...@...>
Date:   2017-07-17T18:13:35Z

    [SPARK-21321][SPARK CORE] Spark very verbose on shutdown
    
    ## What changes were proposed in this pull request?
    
    The current code is very verbose on shutdown.
    
    The changes I propose is to change the log level when the driver is shutting down and the RPC connections are closed (RpcEnvStoppedException).
    
    ## How was this patch tested?
    
    Tested with word count(deploy-mode = cluster, master = yarn, num-executors = 4) with 300GB of data.
    
    Author: John Lee <jl...@yahoo-inc.com>
    
    Closes #18547 from yoonlee95/SPARK-21321.
    
    (cherry picked from commit 0e07a29cf4a5587f939585e6885ed0f7e68c31b5)
    Signed-off-by: Tom Graves <tg...@yahoo-inc.com>

commit 83bdb04871248357ddbb665198c538f2df449006
Author: aokolnychyi <an...@...>
Date:   2017-07-18T04:07:50Z

    [SPARK-21332][SQL] Incorrect result type inferred for some decimal expressions
    
    ## What changes were proposed in this pull request?
    
    This PR changes the direction of expression transformation in the DecimalPrecision rule. Previously, the expressions were transformed down, which led to incorrect result types when decimal expressions had other decimal expressions as their operands. The root cause of this issue was in visiting outer nodes before their children. Consider the example below:
    
    ```
        val inputSchema = StructType(StructField("col", DecimalType(26, 6)) :: Nil)
        val sc = spark.sparkContext
        val rdd = sc.parallelize(1 to 2).map(_ => Row(BigDecimal(12)))
        val df = spark.createDataFrame(rdd, inputSchema)
    
        // Works correctly since no nested decimal expression is involved
        // Expected result type: (26, 6) * (26, 6) = (38, 12)
        df.select($"col" * $"col").explain(true)
        df.select($"col" * $"col").printSchema()
    
        // Gives a wrong result since there is a nested decimal expression that should be visited first
        // Expected result type: ((26, 6) * (26, 6)) * (26, 6) = (38, 12) * (26, 6) = (38, 18)
        df.select($"col" * $"col" * $"col").explain(true)
        df.select($"col" * $"col" * $"col").printSchema()
    ```
    
    The example above gives the following output:
    
    ```
    // Correct result without sub-expressions
    == Parsed Logical Plan ==
    'Project [('col * 'col) AS (col * col)#4]
    +- LogicalRDD [col#1]
    
    == Analyzed Logical Plan ==
    (col * col): decimal(38,12)
    Project [CheckOverflow((promote_precision(cast(col#1 as decimal(26,6))) * promote_precision(cast(col#1 as decimal(26,6)))), DecimalType(38,12)) AS (col * col)#4]
    +- LogicalRDD [col#1]
    
    == Optimized Logical Plan ==
    Project [CheckOverflow((col#1 * col#1), DecimalType(38,12)) AS (col * col)#4]
    +- LogicalRDD [col#1]
    
    == Physical Plan ==
    *Project [CheckOverflow((col#1 * col#1), DecimalType(38,12)) AS (col * col)#4]
    +- Scan ExistingRDD[col#1]
    
    // Schema
    root
     |-- (col * col): decimal(38,12) (nullable = true)
    
    // Incorrect result with sub-expressions
    == Parsed Logical Plan ==
    'Project [(('col * 'col) * 'col) AS ((col * col) * col)#11]
    +- LogicalRDD [col#1]
    
    == Analyzed Logical Plan ==
    ((col * col) * col): decimal(38,12)
    Project [CheckOverflow((promote_precision(cast(CheckOverflow((promote_precision(cast(col#1 as decimal(26,6))) * promote_precision(cast(col#1 as decimal(26,6)))), DecimalType(38,12)) as decimal(26,6))) * promote_precision(cast(col#1 as decimal(26,6)))), DecimalType(38,12)) AS ((col * col) * col)#11]
    +- LogicalRDD [col#1]
    
    == Optimized Logical Plan ==
    Project [CheckOverflow((cast(CheckOverflow((col#1 * col#1), DecimalType(38,12)) as decimal(26,6)) * col#1), DecimalType(38,12)) AS ((col * col) * col)#11]
    +- LogicalRDD [col#1]
    
    == Physical Plan ==
    *Project [CheckOverflow((cast(CheckOverflow((col#1 * col#1), DecimalType(38,12)) as decimal(26,6)) * col#1), DecimalType(38,12)) AS ((col * col) * col)#11]
    +- Scan ExistingRDD[col#1]
    
    // Schema
    root
     |-- ((col * col) * col): decimal(38,12) (nullable = true)
    ```
    
    ## How was this patch tested?
    
    This PR was tested with available unit tests. Moreover, there are tests to cover previously failing scenarios.
    
    Author: aokolnychyi <an...@sap.com>
    
    Closes #18583 from aokolnychyi/spark-21332.
    
    (cherry picked from commit 0be5fb41a6b7ef4da9ba36f3604ac646cb6d4ae3)
    Signed-off-by: gatorsmile <ga...@gmail.com>

commit 99ce551a13f0918b440ddc094c3a32167d7ab3dd
Author: Burak Yavuz <br...@...>
Date:   2017-07-18T04:09:07Z

    [SPARK-21445] Make IntWrapper and LongWrapper in UTF8String Serializable
    
    ## What changes were proposed in this pull request?
    
    Making those two classes will avoid Serialization issues like below:
    ```
    Caused by: java.io.NotSerializableException: org.apache.spark.unsafe.types.UTF8String$IntWrapper
    Serialization stack:
        - object not serializable (class: org.apache.spark.unsafe.types.UTF8String$IntWrapper, value: org.apache.spark.unsafe.types.UTF8String$IntWrapper326450e)
        - field (class: org.apache.spark.sql.catalyst.expressions.Cast$$anonfun$castToInt$1, name: result$2, type: class org.apache.spark.unsafe.types.UTF8String$IntWrapper)
        - object (class org.apache.spark.sql.catalyst.expressions.Cast$$anonfun$castToInt$1, <function1>)
    ```
    
    ## How was this patch tested?
    
    - [x] Manual testing
    - [ ] Unit test
    
    Author: Burak Yavuz <br...@gmail.com>
    
    Closes #18660 from brkyvz/serializableutf8.
    
    (cherry picked from commit 26cd2ca0402d7d49780116d45a5622a45c79f661)
    Signed-off-by: Wenchen Fan <we...@databricks.com>

commit df061fd5f93c8110107198a94e68a4e29248e345
Author: Wenchen Fan <we...@...>
Date:   2017-07-18T22:56:16Z

    [SPARK-21457][SQL] ExternalCatalog.listPartitions should correctly handle partition values with dot
    
    ## What changes were proposed in this pull request?
    
    When we list partitions from hive metastore with a partial partition spec, we are expecting exact matching according to the partition values. However, hive treats dot specially and match any single character for dot. We should do an extra filter to drop unexpected partitions.
    
    ## How was this patch tested?
    
    new regression test.
    
    Author: Wenchen Fan <we...@databricks.com>
    
    Closes #18671 from cloud-fan/hive.
    
    (cherry picked from commit f18b905f6cace7686ef169fda7de474079d0af23)
    Signed-off-by: gatorsmile <ga...@gmail.com>

----


---

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


[GitHub] spark issue #20262: Branch 2.2

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/20262
  
    @alanyeok Seems mistakenly open. Could you close this please?


---

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


[GitHub] spark issue #20262: Branch 2.2

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

    https://github.com/apache/spark/pull/20262
  
    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 #20262: Branch 2.2

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

    https://github.com/apache/spark/pull/20262
  
    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 #20262: Branch 2.2

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

    https://github.com/apache/spark/pull/20262
  
    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 pull request #20262: Branch 2.2

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

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


---

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