diff options
author | Kousuke Saruta <sarutak@oss.nttdata.co.jp> | 2016-04-07 11:03:39 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2016-04-07 11:03:39 -0700 |
commit | 8dcb0c7c974e9707933ac2ae6ce837e765a5e81a (patch) | |
tree | 014267c23747de0ca12ec7259b317b2eb5631c84 /sql/core | |
parent | 3aa7d76395a76fb804fc2f51a39c3179208c33a5 (diff) | |
download | spark-8dcb0c7c974e9707933ac2ae6ce837e765a5e81a.tar.gz spark-8dcb0c7c974e9707933ac2ae6ce837e765a5e81a.tar.bz2 spark-8dcb0c7c974e9707933ac2ae6ce837e765a5e81a.zip |
[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 <sarutak@oss.nttdata.co.jp>
Closes #12237 from sarutak/SPARK-14456.
Diffstat (limited to 'sql/core')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala | 10 |
1 files changed, 0 insertions, 10 deletions
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 1850810270..f55cedb1b6 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) { |