Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/8602#discussion_r38783130
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala ---
@@ -111,18 +111,26 @@ class TestHiveContext(sc: SparkContext) extends
HiveContext(sc) {
override def executePlan(plan: LogicalPlan): this.QueryExecution =
new this.QueryExecution(plan)
+ // At here, we make sure we set those test specific confs correctly when
we create
+ // the SQLConf as well as when we call clear.
override protected[sql] def createSession(): SQLSession = {
new this.SQLSession()
}
protected[hive] class SQLSession extends super.SQLSession {
- /** Fewer partitions to speed up testing. */
protected[sql] override lazy val conf: SQLConf = new SQLConf {
- override def numShufflePartitions: Int =
getConf(SQLConf.SHUFFLE_PARTITIONS, 5)
- // TODO as in unit test, conf.clear() probably be called, all of the
value will be cleared.
- // The super.getConf(SQLConf.DIALECT) is "sql" by default, we need
to set it as "hiveql"
- override def dialect: String = super.getConf(SQLConf.DIALECT,
"hiveql")
- override def caseSensitiveAnalysis: Boolean =
getConf(SQLConf.CASE_SENSITIVE, false)
+
+ TestHiveContext.overrideConfs.map {
+ case (key, value) => setConfString(key, value)
+ }
--- End diff --
same here, can be `clear()`
---
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]