aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorLiang-Chi Hsieh <viirya@gmail.com>2014-09-04 18:46:09 -0700
committerMichael Armbrust <michael@databricks.com>2014-09-04 18:46:09 -0700
commit3eb6ef316c2a5ee43d5ecfcf9f10c2d7adc6b819 (patch)
tree5a06a35824e229e034facc4c94f033477dd51094 /sql
parent90b17a70c703c403d397e24cfbc20da22a32102d (diff)
downloadspark-3eb6ef316c2a5ee43d5ecfcf9f10c2d7adc6b819.tar.gz
spark-3eb6ef316c2a5ee43d5ecfcf9f10c2d7adc6b819.tar.bz2
spark-3eb6ef316c2a5ee43d5ecfcf9f10c2d7adc6b819.zip
[SPARK-3310][SQL] Directly use currentTable without unnecessary implicit conversion
We can directly use currentTable there without unnecessary implicit conversion. Author: Liang-Chi Hsieh <viirya@gmail.com> Closes #2203 from viirya/direct_use_inmemoryrelation and squashes the following commits: 4741d02 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into direct_use_inmemoryrelation b671f67 [Liang-Chi Hsieh] Can directly use currentTable there without unnecessary implicit conversion.
Diffstat (limited to 'sql')
-rw-r--r--sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
index a75af94d29..5acb45c155 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala
@@ -272,7 +272,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
val currentTable = table(tableName).queryExecution.analyzed
val asInMemoryRelation = currentTable match {
case _: InMemoryRelation =>
- currentTable.logicalPlan
+ currentTable
case _ =>
InMemoryRelation(useCompression, columnBatchSize, executePlan(currentTable).executedPlan)