Skip to content

Commit 9c4a950

Browse files
committed
add a comment explaining
1 parent 18fb481 commit 9c4a950

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ class TestHiveContext(sc: SparkContext) extends HiveContext(sc) {
159159
protected[hive] class HiveQLQueryExecution(hql: String)
160160
extends this.SubstitutedHiveQLQueryExecution(vs.substitute(hiveconf, hql))
161161

162+
// we should substitute variables in hql to pass the text to parseSql() as a parameter.
163+
// Hive parser need substituted text. HiveContext.sql() does this but return a DataFrame,
164+
// while we need a logicalPlan so we cannot reuse that.
162165
protected[hive] class SubstitutedHiveQLQueryExecution(hql: String)
163166
extends this.QueryExecution(HiveQl.parseSql(hql)) {
164167
def hiveExec(): Seq[String] = runSqlHive(hql)

0 commit comments

Comments
 (0)