tispark icon indicating copy to clipboard operation
tispark copied to clipboard

NEW FEATURE: Convert json to structured value like struct or array

Open alex-lx opened this issue 7 years ago • 1 comments

Just like spark.read.json, we can get json schema inferred by analysis sample data or, or explicitly given by the user (e.g. the comment).

Is it necessary?

alex-lx avatar Aug 21 '18 10:08 alex-lx

Hi @alex-lx . In short, yes, but that also means most functions concerning JSON values should be implemented including, e.g., explode(), and that might be a pretty complex work, so it won't be our prior task.

As a matter of fact, in order to convert JSON into some user-defined type(UDT), which Spark still has not left public its API yet in 2.3, there might be some issues concerning determining DataFrame schema.

However, we are happy to discuss about these difficulties here in this thread and welcome contribution on implementing fundamental JSON structure. :)

birdstorm avatar Aug 21 '18 14:08 birdstorm