Github user HyukjinKwon commented on a diff in the pull request:
    --- Diff: 
    @@ -343,4 +343,23 @@ class JsonExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
    +  test("to_json") {
    +    val schema = StructType(StructField("a", IntegerType) :: Nil)
    +    val struct = Literal.create(create_row(1), schema)
    +    checkEvaluation(
    +      StructToJson(Map.empty, struct),
    +      """{"a":1}"""
    +    )
    +  }
    +  test("to_json - invalid type") {
    +    val schema = StructType(StructField("a", CalendarIntervalType) :: Nil)
    --- End diff --
    @marmbrus Do you mind if I ask to create another JIRA and deal with this 
problem for JSON/CSV for reading/writing paths? It seems I should add this 
logics separatlely from `JacksonGenerator` instance (as it seems initiated in 
tasks and it is used `DataSet.toJSON`, `StructToJson` and `write.json` and 
therefore, it seems I should add a separate test for each..)

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to