GitHub user ueshin opened a pull request:

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

    [SPARK-25036][SQL][FOLLOW-UP] Avoid match may not be exhaustive in 
Scala-2.12.

    ## What changes were proposed in this pull request?
    
    This is a follow-up pr of #22014.
    
    We still have some more compilation errors in scala-2.12 with sbt:
    
    ```
    [error] [warn] 
/.../sql/core/src/main/scala/org/apache/spark/sql/DataFrameNaFunctions.scala:493:
 match may not be exhaustive.
    [error] It would fail on the following input: (_, _)
    [error] [warn]       val typeMatches = (targetType, f.dataType) match {
    [error] [warn] 
    [error] [warn] 
/.../sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MicroBatchExecution.scala:393:
 match may not be exhaustive.
    [error] It would fail on the following input: (_, _)
    [error] [warn]             
prevBatchOff.get.toStreamProgress(sources).foreach {
    [error] [warn] 
    [error] [warn] 
/.../sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/AggUtils.scala:173:
 match may not be exhaustive.
    [error] It would fail on the following input: AggregateExpression(_, _, 
false, _)
    [error] [warn]     val rewrittenDistinctFunctions = 
functionsWithDistinct.map {
    [error] [warn] 
    [error] [warn] 
/.../sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/SymmetricHashJoinStateManager.scala:271:
 match may not be exhaustive.
    [error] It would fail on the following input: (_, _)
    [error] [warn]       keyWithIndexToValueMetrics.customMetrics.map {
    [error] [warn] 
    [error] [warn] 
/.../sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala:959:
 match may not be exhaustive.
    [error] It would fail on the following input: CatalogTableType(_)
    [error] [warn]     val tableTypeString = metadata.tableType match {
    [error] [warn] 
    [error] [warn] 
/.../sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala:923:
 match may not be exhaustive.
    [error] It would fail on the following input: CatalogTableType(_)
    [error] [warn]     hiveTable.setTableType(table.tableType match {
    [error] [warn]
    ```
    
    ## How was this patch tested?
    
    Manually build with Scala-2.12.


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

    $ git pull https://github.com/ueshin/apache-spark 
issues/SPARK-25036/fix_match

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

    https://github.com/apache/spark/pull/22039.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 #22039
    
----
commit e9220b4e68178a6cba4e02bf34f0623a80dbc31f
Author: Takuya UESHIN <ueshin@...>
Date:   2018-08-08T15:59:25Z

    Add default case to match.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to