Repository: spark
Updated Branches:
  refs/heads/master 3aa7d7639 -> 8dcb0c7c9


[SPARK-14456][SQL][MINOR] Remove unused variables and logics in DataSource

## What changes were proposed in this pull request?

In DataSource#write method, the variables `dataSchema` and `equality`, and 
related logics are no longer used. Let's remove them.

## How was this patch tested?

Existing tests.

Author: Kousuke Saruta <saru...@oss.nttdata.co.jp>

Closes #12237 from sarutak/SPARK-14456.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/8dcb0c7c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/8dcb0c7c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/8dcb0c7c

Branch: refs/heads/master
Commit: 8dcb0c7c974e9707933ac2ae6ce837e765a5e81a
Parents: 3aa7d76
Author: Kousuke Saruta <saru...@oss.nttdata.co.jp>
Authored: Thu Apr 7 11:03:39 2016 -0700
Committer: Michael Armbrust <mich...@databricks.com>
Committed: Thu Apr 7 11:03:39 2016 -0700

----------------------------------------------------------------------
 .../spark/sql/execution/datasources/DataSource.scala      | 10 ----------
 1 file changed, 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/8dcb0c7c/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
----------------------------------------------------------------------
diff --git 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
index 1850810..f55cedb 100644
--- 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
+++ 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
@@ -348,16 +348,6 @@ case class DataSource(
         PartitioningUtils.validatePartitionColumnDataTypes(
           data.schema, partitionColumns, caseSensitive)
 
-        val equality =
-          if (sqlContext.conf.caseSensitiveAnalysis) {
-            org.apache.spark.sql.catalyst.analysis.caseSensitiveResolution
-          } else {
-            org.apache.spark.sql.catalyst.analysis.caseInsensitiveResolution
-          }
-
-        val dataSchema = StructType(
-          data.schema.filterNot(f => partitionColumns.exists(equality(_, 
f.name))))
-
         // If we are appending to a table that already exists, make sure the 
partitioning matches
         // up.  If we fail to load the table for whatever reason, ignore the 
check.
         if (mode == SaveMode.Append) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to