mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Update SparkSqlInterpreterTest
This commit is contained in:
parent
f06a2fa811
commit
02bcd5d815
1 changed files with 4 additions and 2 deletions
|
|
@ -159,11 +159,13 @@ public class SparkSqlInterpreterTest {
|
|||
repl.interpret(
|
||||
"val raw = csv.map(_.split(\",\")).map(p => Row(p(0),toInt(p(1)),p(2)))",
|
||||
context);
|
||||
repl.interpret("val people = z.sqlContext.applySchema(raw, schema)",
|
||||
context);
|
||||
if (isDataFrameSupported()) {
|
||||
repl.interpret("val people = z.sqlContext.createDataFrame(raw, schema)",
|
||||
context);
|
||||
repl.interpret("people.toDF.registerTempTable(\"people\")", context);
|
||||
} else {
|
||||
repl.interpret("val people = z.sqlContext.applySchema(raw, schema)",
|
||||
context);
|
||||
repl.interpret("people.registerTempTable(\"people\")", context);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue