You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2019/07/26 07:35:30 UTC

[GitHub] [incubator-livy] mgaido91 commented on a change in pull request #186: [LIVY-613] Livy can't handle the java.sql.Date type correctly.

mgaido91 commented on a change in pull request #186: [LIVY-613] Livy can't handle the java.sql.Date type correctly.
URL: https://github.com/apache/incubator-livy/pull/186#discussion_r307620893
 
 

 ##########
 File path: repl/src/test/scala/org/apache/livy/repl/SQLInterpreterSpec.scala
 ##########
 @@ -43,6 +46,41 @@ class SQLInterpreterSpec extends BaseInterpreterSpec {
     new SQLInterpreter(conf, new RSCConf(), sparkEntries)
   }
 
+  it should "handle java.sql.Date tpye" in withInterpreter { interpreter =>
+    val personList = Seq(Person("Jerry", Date.valueOf("2019-07-24")),
+      Person("Michael", Date.valueOf("2019-07-23")))
+
+    val rdd = sparkEntries.sc().parallelize(personList)
+    val df = sparkEntries.sqlctx().createDataFrame(rdd)
+    df.registerTempTable("person")
+
+    // Test normal behavior
+    val resp1 = interpreter.execute(
 
 Review comment:
   nit: we can put this on one line

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services