bahir-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ricellis <...@git.apache.org>
Subject [GitHub] bahir pull request #61: [BAHIR-154] Refactor sql-cloudant to use Cloudant's ...
Date Fri, 05 Jan 2018 14:49:58 GMT
Github user ricellis commented on a diff in the pull request:

    https://github.com/apache/bahir/pull/61#discussion_r159889542
  
    --- Diff: sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreRDD.scala
---
    @@ -101,24 +105,24 @@ class JsonStoreRDD(sc: SparkContext, config: CloudantConfig)
           case LessThanOrEqual(attr, v) => ("$lte", v)
           case _ => (null, null)
         }
    -    val convertedV: JsValue = {
    +    val convertedV: JsonElement = {
           // TODO Better handing of other types
           if (value != null) {
             value match {
    -          case s: String => Json.toJson(s)
    -          case l: Long => Json.toJson(l)
    -          case d: Double => Json.toJson(d)
    -          case i: Int => Json.toJson(i)
    -          case b: Boolean => Json.toJson(b)
    -          case t: java.sql.Timestamp => Json.toJson(t)
    +          case s: String => parser.parse(s)// Json.toJson(s)
    --- End diff --
    
    some old code here that should probably be removed (and on the following line)


---

Mime
View raw message