Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/4930#discussion_r26639926
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala ---
@@ -151,7 +152,15 @@ class TestHiveContext(sc: SparkContext) extends
HiveContext(sc) {
val describedTable = "DESCRIBE (\\w+)".r
+ val vs = new VariableSubstitution()
+
protected[hive] class HiveQLQueryExecution(hql: String)
+ extends this.SubstitutedHiveQLQueryExecution(vs.substitute(hiveconf,
hql))
+
+ // we should substitute variables in hql to pass the text to parseSql()
as a parameter.
+ // Hive parser need substituted text. HiveContext.sql() does this but
return a DataFrame,
+ // while we need a logicalPlan so we cannot reuse that.
+ protected[hive] class SubstitutedHiveQLQueryExecution(hql: String)
extends this.QueryExecution(HiveQl.parseSql(hql)) {
--- End diff --
Can you just change this line and do what we have in sql (`new
VariableSubstitution().substitute(hiveconf, hql)`)?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]