Repository: spark
Updated Branches:
  refs/heads/master df61fbd97 -> a2a907802


[SPARK-14039][SQL][MINOR] make SubqueryHolder an inner class

## What changes were proposed in this pull request?

`SubqueryHolder` is only used when generate SQL string in `SQLBuilder`, it's 
more clear to make it an inner class in `SQLBuilder`.

## How was this patch tested?

existing tests.

Author: Wenchen Fan <wenc...@databricks.com>

Closes #11861 from cloud-fan/gensql.


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

Branch: refs/heads/master
Commit: a2a90780281115b72ebe2e4334d6e83058436e27
Parents: df61fbd
Author: Wenchen Fan <wenc...@databricks.com>
Authored: Mon Mar 21 10:04:49 2016 -0700
Committer: Reynold Xin <r...@databricks.com>
Committed: Mon Mar 21 10:04:49 2016 -0700

----------------------------------------------------------------------
 .../org/apache/spark/sql/hive/SQLBuilder.scala    | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/a2a90780/sql/hive/src/main/scala/org/apache/spark/sql/hive/SQLBuilder.scala
----------------------------------------------------------------------
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/SQLBuilder.scala 
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/SQLBuilder.scala
index 5175bd4..b2196c4 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/SQLBuilder.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/SQLBuilder.scala
@@ -34,15 +34,6 @@ import org.apache.spark.sql.hive.execution.HiveScriptIOSchema
 import org.apache.spark.sql.types.{ByteType, DataType, IntegerType, NullType}
 
 /**
- * A place holder for generated SQL for subquery expression.
- */
-case class SubqueryHolder(query: String) extends LeafExpression with 
Unevaluable {
-  override def dataType: DataType = NullType
-  override def nullable: Boolean = true
-  override def sql: String = s"($query)"
-}
-
-/**
  * A builder class used to convert a resolved logical plan into a SQL query 
string.  Note that not
  * all resolved logical plan are convertible.  They either don't have 
corresponding SQL
  * representations (e.g. logical plans that operate on local Scala 
collections), or are simply not
@@ -530,4 +521,13 @@ class SQLBuilder(logicalPlan: LogicalPlan, sqlContext: 
SQLContext) extends Loggi
       case _ => None
     }
   }
+
+  /**
+   * A place holder for generated SQL for subquery expression.
+   */
+  case class SubqueryHolder(query: String) extends LeafExpression with 
Unevaluable {
+    override def dataType: DataType = NullType
+    override def nullable: Boolean = true
+    override def sql: String = s"($query)"
+  }
 }


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

Reply via email to