-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-15072][SQL][REPL][EXAMPLES] Remove SparkSession.withHiveSupport #12851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ | |
| * limitations under the License. | ||
| */ | ||
|
|
||
| import org.apache.spark.SparkContext | ||
| import org.apache.spark.{SparkContext, SparkConf} | ||
| import org.apache.spark.sql.SparkSession | ||
|
|
||
| /** | ||
|
|
@@ -33,8 +33,14 @@ object Main { | |
| def main(args: Array[String]) { | ||
| // scalastyle:off println | ||
| println("Running regression test for SPARK-8489.") | ||
| val sc = new SparkContext("local", "testing") | ||
| val sparkSession = SparkSession.withHiveSupport(sc) | ||
|
|
||
| val conf = new SparkConf() | ||
| .setMaster("local") | ||
| .setAppName("testing") | ||
|
|
||
| val sparkSession = SparkSession.builder.enableHiveSupport().getOrCreate() | ||
|
||
| val sc = sparkSession.sparkContext | ||
|
|
||
| // This line should not throw scala.reflect.internal.MissingRequirementError. | ||
| // See SPARK-8470 for more detail. | ||
| val df = sparkSession.createDataFrame(Seq(MyCoolClass("1", "2", "3"))) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -290,8 +290,9 @@ object SetWarehouseLocationTest extends Logging { | |
| conf.set("spark.sql.warehouse.dir", warehouseLocation.toString) | ||
| conf.set("hive.metastore.warehouse.dir", hiveWarehouseLocation.toString) | ||
|
|
||
| val sc = new SparkContext(conf) | ||
| val sparkSession = SparkSession.withHiveSupport(sc) | ||
| val sparkSession = SparkSession.builder.config(conf).enableHiveSupport().getOrCreate() | ||
| val sc = sparkSession.sparkContext | ||
|
||
|
|
||
| val catalog = sparkSession.sessionState.catalog | ||
|
|
||
| sparkSession.sql("drop table if exists testLocation") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github won't let me comment down there, but in L78 please replace
sc.stopwithspark.stop