File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
sql/hive/src/main/scala/org/apache/spark/sql/hive/test Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import java.util.{Set => JavaSet}
2323import org .apache .hadoop .hive .ql .exec .FunctionRegistry
2424import org .apache .hadoop .hive .ql .io .avro .{AvroContainerInputFormat , AvroContainerOutputFormat }
2525import org .apache .hadoop .hive .ql .metadata .Table
26+ import org .apache .hadoop .hive .ql .parse .VariableSubstitution
2627import org .apache .hadoop .hive .ql .processors ._
2728import org .apache .hadoop .hive .serde2 .RegexSerDe
2829import org .apache .hadoop .hive .serde2 .`lazy` .LazySimpleSerDe
@@ -153,7 +154,12 @@ class TestHiveContext(sc: SparkContext) extends HiveContext(sc) {
153154
154155 val describedTable = " DESCRIBE (\\ w+)" .r
155156
157+ val vs = new VariableSubstitution ()
158+
156159 protected [hive] class HiveQLQueryExecution (hql : String )
160+ extends this .SubstitutedHiveQLQueryExecution (vs.substitute(hiveconf, hql))
161+
162+ protected [hive] class SubstitutedHiveQLQueryExecution (hql : String )
157163 extends this .QueryExecution (HiveQl .parseSql(hql)) {
158164 def hiveExec (): Seq [String ] = runSqlHive(hql)
159165 override def toString : String = hql + " \n " + super .toString
You can’t perform that action at this time.
0 commit comments